Javarevisited Newsletter

Javarevisited Newsletter

Share this post

Javarevisited Newsletter
Javarevisited Newsletter
Law of Demeter - Talk to Friends, Not to Strangers

Law of Demeter - Talk to Friends, Not to Strangers

Principle of least Knowledge with Real life Example

javinpaul's avatar
Soma's avatar
javinpaul
and
Soma
Feb 27, 2025
∙ Paid
13

Share this post

Javarevisited Newsletter
Javarevisited Newsletter
Law of Demeter - Talk to Friends, Not to Strangers
2
Share

Hello guys, the Law of Demeter also known as the principle of least knowledge is a coding principle, which says that a module should not know about the inner details of the objects it manipulates.

If a code depends upon the internal details of a particular object, there is a good chance that it will break as soon as the internal of that object changes.

…

Keep reading with a 7-day free trial

Subscribe to Javarevisited Newsletter to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
A guest post by
Soma
Java and React Developer
Subscribe to Soma
© 2025 javinpaul
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share