An interface in the Java programming language is an abstract type that is used to specify a behavior that classes must implement. They are similar to protocols. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations.

How to access interface?
To access the interface methods, the interface must be "implemented" (kinda like inherited) by another class with the implements keyword (instead of extends). The body of the interface method is provided by the "implement" class.
An interface is similar to a class in the following ways −
- An interface can contain any number of methods.
- An interface is written in a file with a .java extension, with the name of the interface matching the name of the file.
3)The byte code of an interface appears in a .class file.
4)Interfaces appear in packages, and their corresponding bytecode file must be in a directory structure that matches the package name.
An interface can extend multiple interfaces.
1)You cannot instantiate an interface.
2)An interface does not contain any constructors.
3)All of the methods in an interface are abstract.
4)An interface cannot contain instance fields. The only fields that can appear in an interface must be declared both static and final.
5)An interface is not extended by a class; it is implemented by a class.
6)An interface can extend multiple interfaces.