Question OOP-ENC-0005
EasyWhat is the main benefit of encapsulation?
- A.
Every field becomes public
- B.
Internal data can't be changed in invalid ways, and the implementation can change without breaking users
- C.
Show answer and explanation
Answer: B
Callers depend only on the public methods, not on the internal representation.