- Defining a new class by re-using the members of other class.
- We can implement inheritance using “extends” keyword.
- Parent/Super class: The class from which members are re-used.
- Child/Sub class: The class which is using the members
Types of Inheritance:
- Single Inheritance
- Multi-Level Inheritance
- Hierarchical Inheritance
Note: We can achieve above relations through classes
The two other inheritance types are:
- Multiple Inheritance
- Hybrid Inheritance
We cannot achieve multiple inheritance through Classes: