Which feature of OOP reduces the use of nested classes?
Options
- A. Abstraction
- B. Inheritance
- C. Binding
- D. Encapsulation
B. Inheritance
Inheritance allows a class to acquire properties and methods of another class.
Because of inheritance, we don’t need to create deeply nested classes to reuse functionality. Instead, we can extend an existing class and reuse its features.
This reduces complexity and avoids unnecessary nesting.
In C++ and Java, inheritance helps organize code hierarchically rather than nesting classes inside each other.
Other options:
Abstraction → Hides implementation details
Binding → Refers to method call linking (early/late binding)
Encapsulation → Wraps data and methods together
So, the correct answer is (b) Inheritance.
Attempt Quiz Now:
BPSC Tre 4.0 OOPS Concepts Practice Set