Which of the following features of object-oriented programming is used to…

2022

Which of the following features of object-oriented programming is used to secure the data?

  1. A.

    Inheritance

  2. B.

    Polymorphism

  3. C.

    Function overloading

  4. D.

    Encapsulation

Attempted by 298 students.

Show answer & explanation

Correct answer: D

Encapsulation is the fundamental object-oriented programming concept designed to bundle data and methods while restricting direct access to internal components. This mechanism secures data by preventing unauthorized modification through access modifiers like private or protected.

Explore the full course: Up Lt Grade Assistant Teacher 2025