Animal[] animals = {
    new Dog("Rex"),
    new Cat("Whiskers")
};
for (Animal a : animals) {
    a.makeSound();
}
// Rex barks.
// Whiskers meows.
