Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Forum » x-Forum » Question

Difference between Abstract class and interface?

Difference between Abstract class and interface are as follows:

Abstract Class:

Abstract classes have a default constructor and are called when the specific subclass is instantiated.
Contains Abstract methods and Non Abstract methods.
The class that extends the Abstract class should implement all the methods, only Abstract methods must be implemented in the concrete subclass.
Abstract class contains instance variables.

Has no constructor and could not be instantiated.
Abstract method should be declared.
Classes that implement the interface should provide implementation for all the methods.
The interface contains only constants.

for more details:

Posted by mishakapoor 2019-05-08 04:51:03

Thanks for sharing! 

For more details on C programming please refer https://newtum.com/course-details/c-programming-online 

C++ user image newtum posted 2019-12-29 22:02:09

Please login to comment

Log In

Ask New Question