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

To make six cakes Fred uses four and a half cups of sugar. How much sugar does he need for one cake?
how high up is a 3kg object that has 300 joules of energy
What is the solution of -3x -12>3
ill give brainliest help asap please!!! Solve the equation -x = 2 - 3x + 3 and describe your steps.
The role of learning in motivation is most obvious from the influence of​
quadratic formula 5x^2-3=0
Someone who appears depressed is most likely _________. a.)sanguine b.)phlegmatic c.)choleric d.)melancholric
can someone help me with this i still have more !!!
20 points!!!! Plz help me!!! Nixon: Where, then, do we disagree? I think we disagree on the implication of his remarks tonight and on the statements that he has
Why might someone in Sudan or Egypt want to dig a canal?