What is inheritance?
Through inheritance, classes can inherit commonly used state and behavior from their parent class. One class can have a single parent class and a class can have unlimited number of subclasses.
Syntax: class B extends class A
{
// new fields and methods
}
class C extends class A
{
// new fields and methods
}
class D extends class A
{
// new fields and methods
}