Difference between an Abstract class and Interface.An abstract class can have both abstract and concrete methods whereas an interface can have only method signatures.
An abstract class is to be extended by another class, where as an interface is to be implemented in another class.
A class can extend only one abstract class, whereas a class can implement multiple interfaces.
By default, all the methods are abstract and public in interface, whereas in abstract class, the key words public and abstract are to be explicitly specified in an abstract class.
|