Java Interfaces
¥
In
Java, an interface
is a language construct that resembles a
"lightweight" abstract class (an abstract class with no
concrete methods). An interface definition
has the syntax
interface <name> {
<members>
}
¥
which
looks exactly like a class definition except for the use of the keyword interface instead of class. But the members of an interface are restricted to abstract methods and static final fields.