Law of Demeter - Talk to Friends, Not to Strangers
Principle of least Knowledge with Real life Example
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.