Problem Statement
Which OOP principle allows a class to use properties and behavior of another class?
Explanation
Inheritance allows a class (child) to reuse and extend the functionality of another class (parent). It promotes code reuse and hierarchical classification.
Code Solution
SolutionRead Only
class Animal { void eat(){} }
class Dog extends Animal { }