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 traingle has a perimeter of 22 centimeters with a side of 7 centimeters with a side that is 7 centimeters long. the lengths of the remaining 2 sides have a ra
Who decreed the Empire be split into the Western and Eastern Empires?
How did the way the mali empire exercised its power differ from the song Dynasty
How do genes get expressed in an organism?
slader A baseball player slides to a stop on level ground. Using energy consideration, calculate the distance the 65 kg baseball player slides, given his initia
which is more 8 tons or 16,002 pounds
A paper company produces 3,860 notebooks in 4 days. How many notebooks can it produce in 12 days?
shallowest part of the continental shelf that is exposed at low tide
Which shows the correct sequence of steps involved in sexual reproduction?
NEED HELP ASAP 30 POINTS !!!A digital camera memory card is one fourth full. The card is two thirds full when 375 more pictures have been taken How many picture