Monday, November 28, 2011

Difference between abstract classes and interfaces.

When a derived class is inherited from an Abstract class, no other class can be extended then. Interface can be used in any scenario. Abstract class contains abstract method, i.e. actual implementation logic. On the other hand, interfaces have no implementation logic. Every method in an interface must be abstract. This is not necessary in case of abstract classes.

No comments:

Post a Comment