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

What phylum has animals with soft bodies, and most of them have shell-like coverings?
A packet is dropped from a stationary helicopter, hovering at a height 'h' from the ground level, reaches the ground in 12s. Calculate 1) value of 'h' "displac
Give a counter example to this statement. The quotient of two fractions between 0 and 1 is always a whole number.
write the rate 1/7 inch ----------------- as a unit rate 1/14 minute
why did some chiefs decide to fight when english colonists moved into their territory?plz help me
How do I write 4.76325 as a fraction?
Give a counter example to this statement. The quotient of two fractions between 0 and 1 is always a whole number.
why are quebec and ontario known as canadas economic heart
Why can't plants catch a cold?
Find the value of 2 in this equation. 33- (8t) = 15