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
Post a Comment