What is inheritance?

Inheritance is the procedure in which one class inherits the attributes and methods of another class. The class whose properties and methods are inherited is known as the Parent class. And the class that inherits the properties from the parent class is the Child class.What is inheritance-oops?

The interesting thing is, along with the inherited properties and methods, a child class can have its own properties and methods.

Inheritance is one of the most important aspects of Object-Oriented Programming (OOP). The key to understanding Inheritance is that it provides code re-usability. In place of writing the same code, again and again, we can simply inherit the properties of one class into the other.

This is the second article in the series of articles related to Object-Oriented Programming. Please go through the first article as well

There is a type of inheritance.

Single Inheritance

Multiple Inheritance

Multi-level Inheritance

Hierarchical Inheritance

Hybrid Inheritance

Thanks for reading our blog If you have any problem please leave your query in a comment box

What is inheritance-oops?expoundsofttechsolution

What is inheritance-oops?