Search This Blog

Showing posts with label abstract class. Show all posts
Showing posts with label abstract class. Show all posts

Saturday, 15 March 2014

Difference between Abstract class and Interface

Difference between Abstract class and Interface is as follows:-




√ Abstract class can only be inherited while interfaces can not be it has to be implemented.

√ Interface cannot implement any methods, whereas an abstract class can have implementation.

√ Class can implement many interfaces but can have only one super class.

√ Interface is not part of the class hierarchy while Abstract class comes in through inheritance.

√ Unrelated classes can implement the same interface.