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

What steps did Napoleon take to create an empire in Europe?
from the book Frankenstein How does De lacey react to the monster when he meets him?
Can restrictions be put on the amount a candidate can spend on his/her campaign? Why/why not?
How do totalitarian states and constitutional governments differ?
How would -3X + 4Y=8 be written in slop-intercept form? Please show all work(: I have tried this question lots and I'm really confused.
helpnfast!!!!!!!!!!!!!!!!!!!!! What does Tom Bombadil's attitude toward the Ring show about him? A. He thinks Frodo and others who use the Ring are weak. B.
how do you say 'look at the board' 'listen' 'open the windows' 'close the door' 'repeat' 'stand up' 'silence' 'take out your books' 'pack away your things' 'sit
what is the advantage of timing for a full minute to find your pulse
What did Christianity and Judaism emphasize about the individual?
 Write an expository essay explaining which European motive behind imperialism in Africa was the most powerful.