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

who ever answers this will get a cookie from batman
Help. Please I really need need help
An inclined plane wrapped around a metal shaft is a _____. A. lever B. screw C. pulley D. wedge
Imagine you work as a consultant, and your daily job involves listening to the constructive criticism of others. As part of your job, you must listen to opposin
A small book publisher knows that 26 books weigh 41 lbs. How much do 40 books​ weigh?
The passing of heat through a material while the material itself stays in place. A. radiation B. conduction C. convection
Find the dimensions of the circle. Area = 64π in.² r= in.
what are extrinsic values
Okay so What is 4/10 x 1/6?
The Black Hawk War began because... (20 points) a. Sauk leaders signed the Treaty of Dancing Rabbit Creek. b. Congress passed the Indian Removal Act. c. the Sau