rubieceleste3480 rubieceleste3480
  • 22-10-2019
  • Computers and Technology
contestada

Suppose income is 4001, what is the output of the following code? if (income > 3000) { System.out.println("Income is greater than 3000"); } else if (income > 4000) { System.out.println("Income is greater than 4000"); }

Respuesta :

CPED
CPED CPED
  • 23-10-2019

Answer:

Output:

Income is greater than 3000

Explanation:

In conditional statements, either the if statement is processed or the else if.

In this scenario, both the given conditions fit for the given output but when if block will be processed, the else if block will be skipped by default.

So the output will only be the out phrase of if block which is:

Income is greater than 3000.

Answer Link

Otras preguntas

Which mathematical representation correctly identifies impulse? (1 point) impulse=forcetimeimpulse is equal to force over time impulse=force×timeimpulse is equa
if a car traveling at 100 m/s must slam on the brakes to avoid hitting a raccoon and it takes 4 seconds for the car to slow down to a stop , What is its acceler
Help meeegxhdhsisheguwjwwhhejwiw
Which is the best paraphrase of the instructions?
why is one thousand and one nights important??
1.Vinegar in oil•Separation technique:•Explanation:2.Dry Garbage•Separation technique:•Explanation:3.Sugar and cornstarch•Separation technique:•Explanation:​
Select ALL the correct answers. Which three objectives did the progressive presidents share? fighting poverty increasing American influence dismantling monopoli
help please fractions
Locate the James River on this map 3 1 2 4 24
Select the letter of the correct answer * A) 55° B) 50° C) 101° D) 125° E) 24