 <pre><code>abstract class Robot { private WorldOfRobots world; public void setWorld(WorldOfRobots world) { this.world=world; } // content } public class Telebot extends Robot { public Telebot(String newName, String newDirection) { super(newName, newDirection); } public void doSomething() { world.doSomethingElse(); } } public class WorldOfRobots { // List of robots private ArrayList&lt;Robot&gt; robots; public WorldOfRobots() { robots = new ArrayList&lt;Robot&gt;(); } public void addRobot(Robot robot) { robots.add(robot); robot.setWorld(this); } } </code></pre> <p>Storing a reference for the <code>WorldOfRobots</code> in the <code>Robot</code> class is reasonable in this case. If you want a robot to belong to multiple <code>WorldOfRobots</code> then change the world varible to List.</p>