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

conversation between Hitler and gandhi
solve 2/3 + 1/4x = 1/3
How consumers behaviour affect market equilibrium
A history quiz consists of five true-false questions. If you guess on each question, then the probability of answering all five questions correctly is approxima
what time is 9 hours and 30 minutes before. 4:25
The entire region of Northern Africa and southwest Asia has a climate generally described as?
Find an equivalent ratio for 22/55 and then write the proportion
16 increased by twice a number is -24. Find the solution??
If 2 less than or equal too X less than or equal too 6, which of the following has the greatest value
The neolithic revolution is most closely associated with....