What is Encapsulation in Java?

2024

What is Encapsulation in Java?

Answer: C. Integrating data (variables) and code (methods) into a single unit.Encapsulation means binding data variables and methods together into a single unit, usually a class.

  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 497 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: Rssb Senior Computer Instructor

Loading lesson…