Inheritance in OOP
Inheritance is the second of the Four Pillars of Object-Oriented Programming that we encounter.
Here’s a definition: inheritance is a mechanism within object-oriented programming that allows one class to be based on another class, thus receiving its properties and behaviors.
Note
Inheritance is also sometimes referred to as subtyping.