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

which city was located nearest the nile river delta
which city was located nearest the nile river delta
Which two numbers have a difference of 5 and a product of 3.36???
what other areas beside egypt did the new kingdom pharoahs conquer
which city was located nearest the nile river delta
which city was located nearest the nile river delta
write words to match the expression. 24- ( 6+3)
write words to match the expression. 24- ( 6+3)
what other areas beside egypt did the new kingdom pharoahs conquer
If you are writing a persuasive essay in favor of banning vending machines in schools, which is a counterargument you might anticipate?