Abstraction is one of the most powerful features of object-oriented programming. It is a way to provide users with only the most relevant and essential information while hiding the rest.
Abstract classes don’t provide complete abstraction – they can have concrete methods along with the abstract ones.
Interfaces provide complete abstraction; however, they can not have concrete methods.
A constructor is the special method of a class used to initialize the objects of the class.
Abstract classes can have different types of constructors.
Interfaces cannot have constructors.
Inheritance is another feature of object-oriented programming where a particular class can derive from a base class. Multiple inheritance allows the extension of more than one base class in a derived class.
Abstract classes do not support multiple inheritance.
Interfaces support multiple inheritance.
View all Courses