Which of the following is a pillar of OOP?

2024

Which of the following is a pillar of OOP?

  1. A.

    Inheritance

  2. B.

    Encapsulation

  3. C.

    Abstraction

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 702 students.

Show answer & explanation

Correct answer: D

Object-Oriented Programming (OOP) is based on four main pillars: Inheritance, Encapsulation, Abstraction, and Polymorphism. These principles help in organizing code, promoting reusability, and managing complexity. Inheritance allows a class to inherit attributes and methods from another class, enabling code reuse and hierarchical classification. Encapsulation bundles data and methods into a single unit, restricting direct access to some components to enhance security and modularity. Abstraction hides complex implementation details and exposes only essential features, simplifying interaction with objects. Polymorphism allows objects to take on many forms, enabling methods to behave differently based on the object type.

Explore the full course: Up Lt Grade Assistant Teacher 2025