StacySams2271 StacySams2271
  • 02-03-2020
  • Computers and Technology
contestada

What is the output of the following code snippet? int age = 25; if (age > 30) { System.out.println("You are wise!"); } else { System.out.println("You have much to learn!"); }

Respuesta :

ijeggs
ijeggs ijeggs
  • 04-03-2020

Answer:

You have much to learn!

Explanation:

In the question the variable age has been declared and assigned the value of 25.

The if Statement checks if age >30 to output "You are wise!" else it will output "You have too much to learn"

Since age has been assigned the value of 25, we expect the program to execute the else block which is "You have too much to learn"

Answer Link

Otras preguntas

???? Help me pleaseee
Find a function for the graph below.
The wavelength of a photon that has an energy of 7.53* 10^-32
Which sentence is punctuated correctly? A) We were surprised to learn that Harvey is a tall invisible friendly rabbit. B) We were surprised to learn that, Har
Help Please!! 9. What is the mood of the poem “To Autumn”?
Who was Jim Crow and what did he stand for?
Simplify 10+6/2+3 16/5 3 7 11/3
PLS HELP PLS I GIVE BRAINLIEST
convert 2.47x10^-3 to regular notation​
Which of the following is true regarding the inner transition elements? (PF) A. These include the lanthanides and actinides and do not have f sublevels. B. They