explain the three benefits of access protection


Explain the Three Benefits of Access Protection ?

Access protection has three major benefits:
1. It permits you to enforce constraints on an object's state.
2. It gives a simpler client interface. Client programmers don't require knowing everything that's in the class, only the public elements.
3. It separates interface from implementation, permitting them to vary independently. For example consider making the licensePlate field of Car an instance of a new LicensePlate class instead of a String.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: explain the three benefits of access protection
Reference No:- TGS0284580

Expected delivery within 24 Hours