What is the benefit of encapsulation in Java?
Encapsulation makes it easier to change the implementation of the class without affecting other parts of the code.
You're on the right track! Encapsulation does improve maintainability, but it also protects data integrity by controlling access.
Can you explain how making fields private contributes to better data integrity?