0
What's the difference between interface and abstract class?
abstract class is also consisted of abstract methods too. plz help me get this.
3 Antworten
+ 2
A class can only derive from one base class. However, it can derive from multiple interfaces.
+ 1
Abstract Class can contain implementation of methods, fields, constructors, etc, while an Interface only contains method and property prototypes. A class can implement multiple interfaces, but it can only inherit one class (abstract or otherwise).
+ 1
abstract class contains field variables but interface can not contains field variables.
abstract class contains constructor but interface can not contain constructor
single class can not inherited from multiple abstract classes but single class can inherites multiple interfaces
abstract modifier indicates that the thing being modified has missing or incomplete implementation and intetface is completly abstract class which contains only abstract members