An interface specifies
behavior for a class. - Gaddis definition
It is also the keyword that
defines the interface
implements
the java keyword that
indicates that a class is implementing a specified interface
Notes
interfaces provide method
headers. May also provide constants. May not provide attributes
(because these are not inherited).
a class implementing an
interface must implement each of the interface's methods...this is the
contract.
interfaces provide a
"multiple inheritance" mechanism. It is not inheritance, but classes
that implement the same interface can be treated as if they share the
"is-a" relationship.
interfaces may be extended.
The method headers (contractual requirements) are inherited.
Implementing classes must implement all methods in the child and all
ancestors.