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

How does the drug kayexalate work?
Why doesn't Odysseus clasp Nausicaa's knees?
Multiple Choice - Why do some flies live only 12 hours and others live 30 hours without food? a. because some flies ate more food before the food was removed
f(x)=x^2-8x+16 x and y intercepts and vertex
how do we calculate 25% of 300
Based on Oliver Wendell Holmes’ quote, the mind does not have the capacity to do which of the following? learn unlearn expand retract
which measurement is not equal 51 centimeters a o.51meter b 510 millimeter c 51 centimeter d 0.0051 kilometer
What does seasat measure: A. Changes the ocean's height B. Changes in the ocean's land form C.the direction and speed of ocean current D. The velocity of wave h
how do we calculate 25% of 300
One number is 1 more than 2 times another. Their product is 36. Find the numbers.