Superclasses & Subclasses
Home ] Up ] What is Inheritance? ] Inheritance versus Containment ] [ Superclasses & Subclasses ] Visibility Modifiers & Inheritance ] Final Classes & Methods ] Polymorphism ] Data Hiding & Encapsulation ] Abstract Classes ] Interfaces ] Cloning Objects ] The Collections Framework ] Interfaces & Callbacks ]

 

An Example
Points to Notice
Constructor Chaining
Superclass Method Calls
Finalizer Chaining

 

Terminology

The class which is inherited (or derived) from is called the:

superclass (Java)

base class (C++)

parent class or ancestor class

The class which inherits is called a:

subclass (Java)

derived class (C++)

child class or descendant class

Note that the terms subclass and superclass can be confusing!


Superclass
==>

Subclasses ==>

Can you understand why?

 

This page was last modified on 02 October, 2007