created: 3/6/99, revised: 5/7/99, 01/25/00, 01/26/02, 07/22/02, 06/05/03, 04/15/06, 08/21/14, 07/21/16, 01/08/17
Java has single inheritance, only. This means that a child class inherits from only one parent class. Usually this is all you need. Sometimes multiple inheritance would be convenient, where a child class inherits characteristics from several parent classes. But this can be confusing. What happens when two parents have different versions of the same method?
Interfaces give Java some of the advantages of multiple inheritance without the disadvantages.
The chapter includes some small examples, but you will have to wait until the chapters on graphical user interfaces to see interfaces used realistically. Interfaces are crucial to GUI programming.
Is your car a vehicle or a taxable property?