Multiple choice

What is the role of encapsulation in Object Oriented Programming?

  1. It is used to hide the data from the outside view.

  2. By using encapsulation we can use the properties of the base class in the subclass.

  3. Encapsulation binds the data and code in a well defined interface.

  4. All of the above

  5. Both (1) and (3)

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

Yes, (1) and (3) option determines the exact properties of the encapsulation in Object Oriented Programming.