An interface is just like Java Class, but it only has static constants and abstract method. Java uses Interface to implement multiple inheritance. A Java class can implement multiple Java Interfaces.
All methods in an interface are implicitly public and An interface cannot be instantiated. A Java class can implement multiple Java Interfaces.
An interface can extend from one or many interfaces.
A class can extend only one class but implement any number of interfaces
An interface cannot implement another Interface. It has to extend another interface if needed.
It is necessary that the class must implement all the methods declared in the interfaces.
The class should override all the abstract methods declared in the interface
To use an interface in your class, append the keyword “implements” after your class name followed by the interface name.
An interface which is declared inside another interface is referred to as the nested interface.
At the time of declaration, the interface variable must be initialized. Otherwise, the compiler will throw an error.