What are the Similarities between abstract class and Interface in Java.

 

Similarities between abstract class and Interface.


1.Abstract class and interface both are used to achieve abstraction. 


2.Abstract class and interface both can't be instantiated(we cannot create object for both) .


3.All the abstract methods must be overridden by the sub class. 


4.we can create reference Variables for both. 


5.we can go for dynamic(runtime) polymorphism

Comments

Popular posts from this blog

Control Statements:Selection statement ,Iteration statement and Jump statement in Java

Abstract classes and Abstract methods in Java with Examples rcub.

Applets - Inheritance hierarchy for applets, differences between applets and applications, life cycle of an applet, passing parameters to applets, applet security issues.