<<< Interface, Inheritance, and Composition | Index | Why discuss inheritance, interfaces, abstract classes, and composition in one module? >>> |
An interface is similar to a class, except...
interface has no attributes
interface has only method declarations (headers) without implementation.
We already know that...
...a class in Java extends from abstract super class.
Similarly,
a class in Java implements an interface.
<<< Interface, Inheritance, and Composition | Index | Why discuss inheritance, interfaces, abstract classes, and composition in one module? >>> |