Interface
Default properties
1.All data members are public default.All methods are abstract. All variables are static and final
2.Cannot create an object to the Interface--> Interface it = new Interface();(Which is wrong)
3.If we impelemnts any interface to an class and if we donot implements the methods of the Interface
then the class should be abstract
4.Advantage is Runtime Polymorphism
5.N number of interfaces can implements by an class
Uses of Interface:
There are mainly three reasons to use interface. They are given below.
1.It is used to achieve fully abstraction.
2.By interface, we can support the functionality of multiple inheritance.
3.It can be used to achieve loose coupling.
Print PDFDefault properties
1.All data members are public default.All methods are abstract. All variables are static and final
2.Cannot create an object to the Interface--> Interface it = new Interface();(Which is wrong)
3.If we impelemnts any interface to an class and if we donot implements the methods of the Interface
then the class should be abstract
4.Advantage is Runtime Polymorphism
5.N number of interfaces can implements by an class
Uses of Interface:
There are mainly three reasons to use interface. They are given below.
1.It is used to achieve fully abstraction.
2.By interface, we can support the functionality of multiple inheritance.
3.It can be used to achieve loose coupling.
No comments:
Post a Comment