Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com


Our class Inherit


extends the Applet class

that extends the Panel class
that extends Container
that extends Component
that extends Object.
.
Inherit
is an Applet
is a Panel
is a Container
is a Component
is an Object.

If we call the method setBackground,...

we actually call Component's setBackground.

( This is syntactically incorrect, for explaining only )

We have INHERITED setBackground from Component.

This call is to

Container's add method.

So this one's been inherited from Container.

And so has validate .

=========

Component is Container's
  SUPERCLASS .

Container is Component's
  SUBCLASS .

=========

Variables and constants can be inherited, too, not just methods.

=========

NOTES

=========

Another way of putting it, is to say :
Inherit DERIVES FROM
Applet that derives from
Panel etc....

=========
java.lang.Object

is the topmost superclass. All classes, including the ones you make, derive from it.

=========

Private methods, variables, constants are NOT inherited.

Neither are constructors.

For 'private' see the Access Lesson.

.