Asked by: Zoha Tazmen

What is inheritance in OOP?

Answers (1)

Inheritance is a feature of OOP that allows one class (child class) to inherit properties and methods from another class (parent class). This promotes code reusability. For example, a Dog class might inherit from an Animal class.

Answered by: Zoha Tazmen

Your Answer