Polymorphism
ArrayList boxbugs; ArrayList critters; ArrayList kingCrabs; ArrayList workerants; boxbugs.get(i).act(); critters.get(i).act(); kingCrabs.get(i).act(); workerants.get(i).act(); ArrayList actors; actors.get(i).act(); Java correctly decides which type of actor it is and calls the corresponding act() method. All actors act differently, even though they are all being stored as plain old Actors.
Actor Bug BoxBug ZBug Critter RockHound Actor a = new BoxBug(4); a.act(); act(); getActors() BoxBugs act() called Actor a = new RockHound(); a.getActors(); No getActors() method!!!! ERROR!!!