Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.
The class which inherits the properties of other is known as subclass (derived class, child class) and the class whose properties are inherited is known as superclass (base class, parent class).