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

What happens as a result of insertion
List two forms of propaganda that Adolf Hitler used. Describe how they were effective.
what is 0.8-0.5/5+0.2
put the word mechanical weathering into a sentence
which statement explains the periodic table and how is arranged. A. the periodic table is arranged by decreasing atomic mass. B. the periodic table is arranged
what is the answer to the equation 15-5
Which best explains the development of Sydney Carton's character? A. Sydney Carton finally decides to fight for Lucie's love. B. Sydney Carton rushes to Pari
Joe earns $160 per week at a local market. He makes a payment of $12 per week for a new bike. He spends $75 each week on food an entertainment. Joe deposits the
Jasmine is 8 years younger than twice her sisters age. If her sister is 22 how old is jasmine. I know the answer is 36, I don't know how to write the problem.
a sum of money was shared among Daniel Elliot and frank in the ratio 5:7:8 if franks share was $2,781 more than Daniels share what was the original sum of money