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

When recording blood pressure, the systolic is recorded first. True False
help will give crown
I need help on this. Also if you can explain how you got it, it would help!! Thank you
Negative impact on the goal setting
How do I put (1352)⋅(1251)=1562652=117 into a fraction?
help me I pay you guy
Jerliyn picked 40 apples in5 minutes What is the unit rate
One example of a cell needing ATP energy is during
2. Name the hormones that regulate the balance of sodium and potassium levels and explain how they work.
Trey weighs 7 pounds less than his brother. Together they weigh 119 pounds. How much does Trey weigh?