Inheritance
Introduction
Java API
How the Java API uses inheritance
- The Java API uses inheritance extensively in its own classes, so you often need to know what the inheritance hierarchy is as you use these classes. Examples:
- All classes ultimately inherit the Object class in the java.lang package.
- All Swing classes, which are stored in the javax.swing package, inherit the Component and Container classes in the java.awt package. This package contains the Abstract Windows Toolkit (AWT) classes.
- A class can use the fields and methods of any of its superclasses.