Create an anonymous object that inherits the Animal class.
Redefine the makeSound() method so that it displays a word corresponding to the sound produced by the animal (for example, "Meow" for a cat) to the console.
Create an anonymous object that inherits the Animal class.
Redefine the makeSound() method so that it displays a word corresponding to the sound produced by the animal (for example, "Meow" for a cat) to the console.
Create a free account to access the full topic