Which of the following deals with protecting an object's internal data by controlling access?

  • APolymorphism
  • BEncapsulation
  • CInheritance
  • DAll of them
Show answerHide answer

Correct answer B

Encapsulation hides an object’s internal data and exposes only necessary methods. It controls access to data, ensuring integrity and security.