Multiple choice

When we are making all data members of class private, which property of OOP are we using?

  1. Inheritance

  2. Polymorphism

  3. Encapsulation

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Encapsulation is a mechanism that binds together code and data which it manipulates and keeps both of them safe from outside interference and misuse. Hence, this is the correct answer.