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

Conteúdo do Curso

Java Extended

Java Extended

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

bookParrot Information Display Challenge

Tarefa

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 9
toggle bottom row

bookParrot Information Display Challenge

Tarefa

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 9
toggle bottom row

bookParrot Information Display Challenge

Tarefa

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Tarefa

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. Capítulo 9
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt