In object-oriented programming, inheritance is when an object or class is based on another object or class, using the same implementation. Inheritance in most class-based object oriented languages is a mechanism in which one object acquires all the properties and behaviors of parent object. The idea behind inheritance is that you can create new classes that are built upon existing classes. or specifying a new implementation to maintain the same behavior. Such an inherited class is called a subclass of its parent class or super class. It is a mechanism for code reuse and to allow independent extensions of the original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed graph. Inheritance was invented in 1967 for Simula.

Want to Learn

Top 10 Tutorials For Inheritance