What is Encapsulation in Java?

2024

What is Encapsulation in Java?

  1. A.

    The ability of one class to inherit the properties of another class.

  2. B.

    The ability of an object to take many forms.

  3. C.

    Integrating data (variables) and code (methods) into a single unit.

  4. D.

    The ability to overload methods.

  5. E.

    Question not attempted

Attempted by 135 students.

Show answer & explanation

Correct answer: C

Encapsulation means binding data variables and methods together into a single unit, usually a class.

Explore the full course: Up Lt Grade Assistant Teacher 2025