- Interfaces doesn’t have constructors
- Can implement multiple inheritances.
- Contain only abstract methods (Only method prototype is declared)
- Can not create object for interfaces.
- Interfaces are reference type.
- An interface can implement by multiple classes.
- A derived class can implement multiple interfaces, but can inherit from only one class (abstract or not).
- Interfaces are default public.
Abstract Class:
- Abstract classes can have constructors.
- Can’t implement multiple inheritances.
- Contain abstract methods and general methods also.
- Can not create object for abstract class.
- Abstract classes are reference type.
0 comments:
Post a Comment