Problem Statement
What is the main benefit of data hiding in encapsulation?
Explanation
By hiding internal state and exposing controlled access, encapsulation ensures the object’s data remains valid, prevents unauthorized changes, and reduces bugs caused by misuse of internal fields.