An
interface in
Java programming language is an
abstract type that is used to specify an
interface (in the generic sense of the term) that
classes must implement. Interfaces are declared using the
interface
keyword, and may only contain
method signature and constant declarations (variable declarations that are declared to be both
static
and
final
). All methods of an Interface do not contain implementation (method bodies) as of all versions below Java 8. Starting with Java 8,
default
and
static
methods may have implementation in the
interface
definition.