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

you are taking a test worth 130 points. There are a total of 50 five-point and two-point questions. How many five-point questions are there on the test?
A participial phrase acts as _____. 1:a pronoun 2:a verb 3:an adjective 4:noun
What statement correct describes the diagram
The Cold War resulted from?
please help me with this geo problem
Solve for x in the equation? a/(2x-c) = -1
I need help with this question please help
Who inspired rome to create a republic? how was this republic structured?
Explain how this enables the bacterium to detect the population density
¿Qué palabra está escrita correctamente? pantalón pantaloon