GoConqr has a new look! Let us know what you think.

Module 2 of 12 · Text

Return x Print

Brenda Gabriela Senra da Silva

Imprimir na tela não é devolver um valor.

Quando algo é retornado, o main pode guardar esse valor em uma variável.

  • void → executa algo, mas não devolve valor

  • return → devolve valor para quem chamou

O System.out.println envia a mensagem para o console, não para o main.

Printing on the screen is not the same as returning a value.

When something is returned, main can store that value in a variable.

void → performs an action but does not return a value.

return → sends a value back to the caller.

System.out.println sends the message to the console, not to main.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?