92.3k views
1 vote
Which occurs when private details of a class are hidden from other classes or parts of the program that uses instances of the class??

User VitalyB
by
5.0k points

1 Answer

3 votes

Answer:

Encapsulation is the concept of hiding the private details of a class from other classes or parts of the program that uses instances of the class. Encapsulation helps to protect the data within an object from being modified by code outside the object, and it also allows for the implementation of the object to change without affecting the code that uses the object. Encapsulation is often achieved in programming languages through the use of access modifiers, such as "private" or "protected," which determine which parts of the code can access the data within an object.

Step-by-step explanation:

User Zana
by
4.7k points