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

I don't understand help please :(
Many car enthusiasts travel the world in search of the classic car, I love old cars but I can't afford to support such a hobby. Which error does the sentence a
-6(9x + 5) - 3x + 4x = -408 + x Solve for X. Please help!! Best answer will get brainliest!!! :)
What imperial nation imposes policies and laws on its colony?
What's the main difference between a metaphor and a simile? a. a simile is an implied comparison and a metaphor is a direct one. b. a simile is a type of figu
Help only one question in math.
Which of the following passages includes a sensory detail for sight? At last, when the ship we were in, had got in all her cargo, they made ready with many fe
what can produce a duplicate gene?
Read the rough draft. i believe it is escential that antique dealers record all collectibles in their accounts. what word from the draft is misspelled? a.escent
An angle measures 56° less than the measure of a complementary angle. What is the measure of each angle?