Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@vishal-pysGmK • May 27, 2013
interface uses abstract classes -
@anoop-kumar-GDGRCn • May 27, 2013
abstract class :
1. can have all the methods unimplemented (abstract) like interfaces (useless why not use interfaces)
2. Generally have some implemented and some of the unimplemented methods so child class can use unimplemented as they want and already implemented methods in abstract class they already present while extending.
Interfaces:
1. Main purpose of using interfaces is a contract, between client and developer that what kind of method a class should have. Client does know what an object could do but not the implementation. It's job of developer.
2.Since interfaces can point to any object of class which have implemented it. In real programming developer always makes reference to interface not the concrete class name.
Actual purpose of interfaces to provide a structure of a project.
Rest of syntax tricks, you can Google and exercise it.😀