What are the roots?

If you think of the objects in memory as a tree, the “roots” would be the root nodes – every object immediately accessible by your program. Person p = new Person(); p.car = new Car(RED); p.car.engine = new Engine(); p.car.horn = new AnnoyingHorn(); There are four objects; a person, a red car, its engine and … Read more