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

They have watered the street it’s shines in the glare of lamps cold white lamps and lies like a slow moving river
explain the following sentence, "these presidents were lax in enforcing antitrust regulations"
The base of a parallelogram is 1.4 feet long, and the height is 0.32 feet. What is the area of the parallelogram?
Give three properties of a Solid
Use the solubility rules and the periodic table to predict the product that will precipitate out in the reaction. K2SO4(aq) + Ba(NO3)2(aq) → ? A. KNO3 B. Ba(N
Jason and David went hiking at different times. Jason is currently 54 feet above sea level while David is starting at 11 feet below sea level. What is the diffe
What is the slope of the line y= 1
How many subsets are in a, b, c,d
Who knows the top one pls help
Seth wants his friend George to ride bikes with him after school, but George wants to do homework together. What kind of conflict is this?1.character versus th