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

Alex owes his father $100. His father pays him $12.50 an hour to work at their family store. The function d=100-12.5h represents the amount of debt d Alex has.
Find the product of (x − 7)^2. Basically Simplify It
(Urgent) DNA is the primary source of heritable information in cells. Explain how the chemical structure of DNA makes this possible.
Which triangles are congruent in the diagram?
The Island of Dr.Moreau (Chapter 15) How does Montgomery feel about the Beast People? What is M'ling's relationship with Montgomery? Why is the Leopard Man more
Please help! I don’t know how to write the equations
When adjustable mortgage rates began to increase What was the result? Select all that apply A)Banks towered mortgage rates to help people B)Thousands of home
Please answer this correctly
If corn #1 comes from a parental generation composed of homozygous purple kernels and homozygous yellow kernels then, the monohybrid cross will produce a genera
Given O below, if XY and YZ are congruent, what is the measure of chord XY