The most significant advantage of object oriented programming is the reusability of the code. This reusability achieved by a mechanism called inheritance. Inheritance is also refer to as “is-a” relationship.
Inheritance is basically achieved by creating a new class reusing the properties of existing one along with the additional characteristics of the new class.
This method or mechanism of mechanism of driving a new class from another class is called sub class and the existing class from which the sub class is derived is the base class or super class.