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

If 90% of Sage's height is 5 foot 4, what is 100% of her height? **PLEASE ANSWER**
Which of the following did NOT contribute to American prosperity during the "Coolidge" years?
When working with a Bunsen burner, which safety rule is MOST important?
An example of a destructive force is the formation of mountains. true or false
Andrea is trying to lose 25 pounds in one month. Which is the best approach?
Which character trait is revealed through these line?
order from least to greatest. 38%, 8/25, 0.41
what is the difference between the free exercise clause and the establishment clause?
judy spent $4.55 on oranges that cost$0.65 each.if x=the number of oranges ,what eqution would determine how many oranges did judy purchased?
In the cerebral cortex alcohol a. Stimulates the behavioral center b. increases the processing of info c. inhibits the thought process.