Explain it in 60 seconds
The Law of Demeter
Backend Engineering · OOP and Design Patterns · Intermediate
What is the Law of Demeter?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- "Talk only to your immediate friends."
- Avoid a.getB().getC().doX().
- Reduces knowledge of others' internals.
- Tell, don't ask.
- Don't over-apply with fluent APIs/DTOs.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.