Explain encapsulation and why it matters in Java.
Strong answer
Encapsulation keeps state and the rules that protect it behind a controlled API. It prevents callers from creating invalid state and lets the implementation change without breaking every caller.
