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

identify at least three different types of clinics
how many thousands are in 50000
A=1/2bh for b What is b?
How can i write all the names that apply √36
What was a strength for the British during the American Revolution? a. the size of their military b. their ability to acquire supplies c. fighting a war abro
12 posters for 36 student;21 poster for 63 students
what is 2,716 rounded to the nearest thousand
The combination for a like is a 3 digit number. The digits are the prime factors of 42 listed form least to greatest. What is the combination for the lock?
Write 1.48 repeating as a mixed number
948÷ 10 to the 3rd power