Lets see how Abstract classes and Interfaces differs,
- Abstract classes supports both abstract(methods without definition) and non-abstract methods.
- Interface supports only abstract method, then multiple Default and Static methods.
- Interface supports multiple inheritance by implementing multiple interfaces.
- Abstract class doesn't provide support for multiple inheritance.
- Interface can't provide implementation of abstract class.
- Abstract class can provide implementation of interface by defining their methods.
- Abstract class can extend other java class and implement multiple interfaces.
- Interface only extends other interfaces only.
Top comments (0)