Skip to main content
Interface | What is Interface in JAVA | Why we use Interface
What is Interface?
- Interface in JAVA is bluprint of a class. It as static and abstract methods.
- Interface supports 100% abstraction and thus all the methods in interface class are be default abstract
- Multiple inheritance can be achieved using the interface as interface has unimplemented methods and thus we can use them as per our needs
- We can not create an object of interface and thus it support one more OOPs concept - Inheritance
How to achieved Inheritance in Interface?
- Class A implements Interface B
- Interface C extends Interface D
Comments
Post a Comment