go to home page   go to next page

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


CHAPTER 53 — Interfaces

Chapter Topics:

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.


QUESTION 1:

Is your car a vehicle or a taxable property?