In this article we will cover following points
1. Difference between Abstract Classes and Interfaces
Abstract classes vs Interfaces
1. An abstract class is a special kind of class which is created using the abstract keyword. It can
not be instantiated. It can have implementation for some or all of its members.
2. Interface is created using the Interface keyword. Interface can have only declaration for its
members and no implementation.
3. An abstract class can inherit from interface or another abstract class. It can inherit from
multiple interfaces at the same time.
4. Interface can inherit only from another interface. It can inherit from multiple interfaces.
5. An abstract class can have access modifiers for its members.
6. Interface can not have access modifiers for its members. All the members of an interface is
assumed as public.
7. If we add a new method or member to an abstract class then we have the option to provide
default implementation & therefore all the existing code will work.
8. If we add a new member declaration in interface, we will have to track down all the
implementation of the interface & implement new method.
9. Abstract classes can have fields. But Interfaces can not have fields.