Which feature of OOP boosts the code reusability?
2022
Which feature of OOP boosts the code reusability?
- A.
Encapsulation
- B.
Polymorphism
- C.
Inheritance
- D.
Abstraction
Attempted by 205 students.
Show answer & explanation
Correct answer: C
The correct option is Option 3: Inheritance.Inheritance allows a new class (subclass) to acquire the properties and behaviors of an existing class (superclass). By inheriting existing code, you avoid writing the same logic from scratch, which directly boosts code reusability.