revised 11/27/98; 2/14/99; 01/24/00

CHAPTER 50 --- Inheritance

Inheritance enables you to define a new class based on a class that already exists. The new class will be similar to the existing class, but will have some new characteristics. This makes programming easier, because you can build upon your previous work instead of starting out from scratch.

Inheritance (and other features of object oriented languages) is responsible for the recent enormous increase in the features and complexity of modern software. Graphical user interfaces define each visual component (windows, buttons, sliders, and icons) by using inheritance with a "toolkit" of basic components.

This chapter will discuss the syntax and semantics of Java inheritance using some simple examples. The next chapter will continue the discussion using some larger examples.

Chapter Topics:

  • Single Inheritance
  • IS-A Relationship
  • Class Hierarchies
  • Syntax of Java Inheritance
  • The super Reference
  • Method Overriding

QUESTION 1:

From which parent did you inherit your brilliance?
Mother
Father

Click Here after you have answered the question