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

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

No Ans Posted

Please login to comment

Log In

Ask New Question