Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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.
 
PREVIOUS NEXT
Tagged: #similarity #abstract #class #interface #java
ADD COMMENT
Topic
Name
5+6 =