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

A blue rope is 3 times the length as a red rope. A green rope is 5 times as log as the blue rope of the total length of all 3 ropes equals 508.25m what is the l
What's 5 divided by x squared explain
What all the multiples of 81?
What is the creepiest sounding scale? What scale would u use for writing creepy music in other words
Factor the expression. If the expression cannot be factored, say so.
What were the contributions of the Harappan civilization?
What's 5 divided by x squared explain
a lunch bill including tax, is divided among you and 5 friends. everyone pays less than $8.75. write and solve an inequality that describes the total amount of
What is the creepiest sounding scale? What scale would u use for writing creepy music in other words
Thelma spent 1/6 of her weekly allowance on dog toys.  1/4 on a dog collar and 1/3 on dog food.  What fraction of her weekly allowance is left