Question
In Java, which comparison about Encapsulation is accurate?
- There is no practical difference in behavior, performance, or API design when Encapsulation is involved.
- The oldest option related to Encapsulation is always the right production choice regardless of context.
- Differences around Encapsulation are mostly cosmetic, so correctness and maintainability do not change.
- Good encapsulation exposes behavior-focused methods rather than raw unrestricted field mutation.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: D. Good encapsulation exposes behavior-focused methods rather than raw unrestricted field mutation.
Good encapsulation exposes behavior-focused methods rather than raw unrestricted field mutation. This is the comparison that usually separates memorization from understanding.
Track: Java