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

Movie Temple Grandon 1) What do you think would have happened to temple if she had been institutionalized as her father wanted? 2) Why was Temple elementary sch
*Two objects have an elastic collision. Before the collision they approach one another with a velocity of 45 m/s. With what speed will they be separating after
-16x^2+150x=425 solve for x​
shiny ( more than two)
A model a rocket is used to test materials that will be used to build the body of the actual rocket. What is a limitation of this model? O A. It can be used to
True or false? Show steps
PLEASE SOLVE ASAP!! 100 POINTS
How much volume of butanol should be combined with 30.0 mL ethanol to make a 5.88% volume percent solution of ethanol in butanol
2. The school play started at 8:15 P.M. and ended at 8:56 P.M. How long was the school play?
I originated in the 70s in new york city. I can be performed when listening to disco, pop and contemporary music. It wasn’t until i was introduced in john travo