Computer Science, asked by lena17, 8 months ago

What are the features of encapsulation?

Answers

Answered by shivamkumar82352
2

Answer:

In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class. Therefore, it is also known as data hiding. Declare the variables of a class as private. Provide public setter and getter methods to modify and view the variables values.

Similar questions