Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Parrot Information Display Challenge | Classes

Parrot Information Display ChallengeParrot Information Display Challenge

Task

There is a class called Parrot that already has all the fields and a constructor defined. In the main method, three different parrots are created, and then I attempt to print each of them on the screen. However, it only displays the hash code and the class name. Your task is to write a toString() method that will display all the information about the parrot.

Everything was clear?

Section 4. Chapter 9
toggle bottom row

Parrot Information Display ChallengeParrot Information Display Challenge

Task

There is a class called Parrot that already has all the fields and a constructor defined. In the main method, three different parrots are created, and then I attempt to print each of them on the screen. However, it only displays the hash code and the class name. Your task is to write a toString() method that will display all the information about the parrot.

Everything was clear?

Section 4. Chapter 9
toggle bottom row
some-alt