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?
- A.
Inheritance
- B.
Polymorphism
- C.
Function overloading
- 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.