Inheritance allows the creation of hierarchical classifications. Using inheritance, you can create
a general class that defines traits common to a set of related items. This class can
then be inherited by other, more specific classes, each adding those things that are unique
to it.
In the terminology of Java, a class that is inherited is called a superclass. The
class that does the inheriting is called a subclass. Therefore, a subclass is a specialized
version of a superclass. It inherits all of the instance variables and methods defined by the superclass and adds its own, unique elements. The general form of a class declaration that inherits a superclass is shown here:
class subclass-name extends superclass-name {
// body of class
}