Java Programming

Interfaces
In the Java programming language, an interface is a reference type, similar to a class, that can contain only following type of elements:


 * Constants


 * Method signatures


 * Default methods


 * static methods


 * Nested types

Method bodies exist only for default methods and static methods. Interfaces cannot be instantiated—they can only be implemented by classes or extended by other interfaces.