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

Find the value of x.  Round to nearest hundredth if necessary.
How do scientists use seismic waves to determine the interior structure of Earth?
The length of a diagonal of a cube with edge length 25cm
Explain how a species can evolve through natural selection.
the cafeteria has 45 square  tables that can be pushed together to form one long table for the lacrosse team's banquet. Each square table can seat one person on
Which of the following statements is true concerning LUCA? (1) LUCA was a cell. (2) All life on Earth evolved from LUCA. (3) LUCA probably existed probably arou
How did scientists discover the common structure of cells?
How do you Factor c(squared)-8c ??
Find all powers of 4 in range 4 through 1,000
A farmer hauled in 120 bales of hay. Each of his cows ate 1 1/4 bales. How many cows the farmer feed?