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

The electoral college makes the decision of electing the ? of the united states.
why are political parties created?
which organelle can be compared to a security guard who decides whom may enter a building and whom may not? cell membrane cytoplasm endoplasmic reticulum mitoch
Solve the equation, if possible. -3|6n - 2| + 5 = 8
find the balance on a deposit of $1,150 that earns 9% interest compounded annually for 2 years
Simplify. 4ab5c(3a4b2c3) a. 12a5b3c4 b. 12a5b7c4 c. 12a5b10c4 d. 12a4b10c3
why is it important to not get distracted while driving?
what might be considered a reason for germany's inability to maintain alliances with russia?
B. In your opinion, which Asian nation has had the greatest success in meeting its peoples’ needs since World War II? Justify your answer with specific details.
which are different forms of the same gene?