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

True Or False: Lincoln faced northern opposition to the civil war after congress approved a draft or forced military service in 1863
5 yards and 7 feet equal how many feet
classify each type of income as earned or unearned: gifts
The triangles shown below must be congruent. True or false
Please all answers I'm in a hurry
How can a global dependence on fossil fuels have associated social costs? This is a discussion question, so if you could give me a few keywords or phrases, tha
If you are going 100 mph how far will you go in 1 hr?
The cells of your skin that are responsible for absorbing harmful UV rays are called? ______________
Maintenance of the acid base balance of the blood is linked to the function of
How long did it take to build (ONE) Terracotta Warrior