Domanda di colloquio di Tata Consultancy Services

What is inheritance in object oriented programming?

Risposta di colloquio

Anonimo

2 giu 2022

Inheritance is a mechanism based on classes. Inheritance refers to inhering the data members and properties of a parent class to a child class. A class which is derived from another level is often called as a sub-class or a child class, and the type from which the child class is obtained is known as super-class or parent class.