Frage im Vorstellungsgespräch bei Tata Consultancy Services

What is inheritance in object oriented programming?

Antwort im Vorstellungsgespräch

Anonym

2. Juni 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.