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

Both Seagulls and wild geese are large birds. They're also similar in that both kinds of birds can fly over great distances. On the other hand, seagulls are sc
When the notes of a chord are played in succession rather that simultaneously, it is called an A. arpeggio B. appaggiatura C. affetuoso D. all’ottava
ok, so if a/b = c/d, then ab= cd, is this 1: cross product property 2: rational equation 3: excluded 4: rational exponents 5: or rational expression
A wildlife conservancy maintains a ratio of 2 squirrels for every 8 birds how many birds would there be if there were 15 squirrels
Which number on this map represents Lake Victoria? A. 10 B. 4 C. 16 D. 22
The geography and climate of Italy makes it a better location than Germany for the production of
four fifths of senior class went to prom. if 324 seniors went to prom, how many are there in the senior class
how to solve 4p(q-1)+q(1-p)
The lapita has a very distinctive type of?
Psalm 2 describes the Messiah.true of false