An interface in java is a blueprint of a class. It has static constants and abstract methods only.
The interface in java is a mechanism to achieve fully abstraction. There can be only abstract methods in the java interface not method body. It is used to achieve fully abstraction and multiple inheritance in Java.
Java Interface also represents IS-A relationship.It cannot be instantiated just like abstract class.
A class can only implement interfaces
Uses:
It is used to achieve fully abstraction.
By interface, we can support the functionality of multiple inheritance.
Anonymous User
21-Apr-2015Samuel Fernandes
21-Apr-2015