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

Contenido del Curso

Java Extended

Java Extended

1. Deep Java Structure
2. Methods
3. String Advanced
4. Classes
5. Classes Advanced

bookParrot Information Display Challenge

Tarea

Your task is to write a toString() method that will display all the information about the parrot.

  1. In the toString() method, use the return keyword to specify the output of the method.
  2. Start by creating a string, either using concatenation or string formatting, beginning with something like Parrot{.
  3. Add each field to the string, using + for concatenation, and include both the field name and its value (e.g., "name='" + name + "'").
  4. Separate each field with a comma and a space for better readability.
  5. End the string with a closing brace } to properly represent the object.
  6. Finally, return the formatted string from the toString() method.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 9
toggle bottom row

bookParrot Information Display Challenge

Tarea

Your task is to write a toString() method that will display all the information about the parrot.

  1. In the toString() method, use the return keyword to specify the output of the method.
  2. Start by creating a string, either using concatenation or string formatting, beginning with something like Parrot{.
  3. Add each field to the string, using + for concatenation, and include both the field name and its value (e.g., "name='" + name + "'").
  4. Separate each field with a comma and a space for better readability.
  5. End the string with a closing brace } to properly represent the object.
  6. Finally, return the formatted string from the toString() method.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 9
toggle bottom row

bookParrot Information Display Challenge

Tarea

Your task is to write a toString() method that will display all the information about the parrot.

  1. In the toString() method, use the return keyword to specify the output of the method.
  2. Start by creating a string, either using concatenation or string formatting, beginning with something like Parrot{.
  3. Add each field to the string, using + for concatenation, and include both the field name and its value (e.g., "name='" + name + "'").
  4. Separate each field with a comma and a space for better readability.
  5. End the string with a closing brace } to properly represent the object.
  6. Finally, return the formatted string from the toString() method.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Tarea

Your task is to write a toString() method that will display all the information about the parrot.

  1. In the toString() method, use the return keyword to specify the output of the method.
  2. Start by creating a string, either using concatenation or string formatting, beginning with something like Parrot{.
  3. Add each field to the string, using + for concatenation, and include both the field name and its value (e.g., "name='" + name + "'").
  4. Separate each field with a comma and a space for better readability.
  5. End the string with a closing brace } to properly represent the object.
  6. Finally, return the formatted string from the toString() method.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 4. Capítulo 9
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
some-alt