What is Encapsulation in Java?
2024
What is Encapsulation in Java?
- A.
The ability of one class to inherit the properties of another class.
- B.
The ability of an object to take many forms.
- C.
Integrating data (variables) and code (methods) into a single unit.
- D.
The ability to overload methods.
- 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.