Hi, Basically we need understand why to opt an Interface or an Abstract Class.
Interface is basically a standard or acts as a plugin. If any class implements an inteface then all the methods present in the interface has to be defined in that class. It is a commitment by the class which is implementing this interface to define all the methods present in the interface.
Where as an Abstract class is required when the class needs to inherit or extend some behaviour of the Abstract class to be present with it. To be more clear about this, we opt abstract classes when we should fit into the class hierarchy.
View All Comments
| View Tutorial