Introduction To The Law Of Demeter In Java
Introduction The law of Demeter states that objects should only interact with their immediate surroundings. Specifically: That means, the methods of an object should only call methods on other objects that: And it should not call methods on objects that: Here is a simple diagram to illustrate the principle: Friends, Strangers??? OK, some new terminologies … Read more