employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Is this your company?

Tata Consultancy Services interview question

What is inheritance?

Interview Answer

Anonymous

May 12, 2021

In, Object-Oriented Programming, 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.