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

Please answer correctly!
What is number 1 and 2?
If 425.0 grams of butene react completely in excess oxygen, how many grams of each product are produced? How many grams would be produced if the percent yield i
How does extinction affect evolution? It speeds up the evolution of other species. It slows down the evolution of other species. It completely stops the evoluti
How do I find the answer?
f(x)=x^2 what is g(x)
I WILL MAKE YOU THE BRAINLIEST EASY QUESTION
How did Habsburg Spain use religion to maintain authority?
n the following diagram, points C, A, and B are collinear. Use complete sentences to describe the sum of CA and AB
How many roots does the polynomial function, y=(x-8)(x+3)^2 have? A. 2 B. 4 C. 3 D. 1