The Person Superclass
Let's consider that you might define a person class. Every object of class person has a set of traits that define it.
Every person has two piece of data and three methods:
The Programmer Subclass
To make a subclass, you'll use the keyword extends. For example, we might write:
public class Programmer extends Person
This means that a programmer "is-a" person. You can now create a Programmer object, and freely call any method defined in Person!
But a programmer isn't just a copy of its superclass. It has an additional piece of data and method, which we'd write the same way you would write it in a normal class.
This means that a programmer has all of the functionality of a Person, but only needs to add a small amount of code for its own special data and method!