similarity between abstract class and interface java code example

Example: similarity between abstract class and interface java

1. We cannot create object using either.
2. All the abstract methods must be overridden by subclass.
3. Both of them don’t have default constructor.
4. By using both we can go for dynamic polymorphism.
5. Both can contain static and final variable.
6. Both inherited from common domain of itself using extends keyword.
7/ Both provide static method implementation.

Tags:

Misc Example