¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 2 de 12 · Texto

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.

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?