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

Susan invests twice as much money at 7.5% as she does at 6%. If her total interest after a year is $840 how much does she have invested at each rate?
Recently in the United States, there were about 300,000,000 cell phone users. That same year there were about 5.7x10^9 cell phone users worldwide. About how man
What chemical compound is C2HsOH?
System of equations x-y-2z=4, -x+2y+z=1, x+y-3z=11. Solve by elimination
find the derivative of ((t^4-6)^3)*((t^3+6)^4)
Find the value of 2 in this equation. 33- (8t) = 15
why do living things need nitrogen?
Why is man a special creature? What two worlds does he share in?
how can you tell the difference between additive comparison and multiplication comparison
how did the experience of the early colonists shape Americas political and social ideals?