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 number can 13 and 7 go into?
What Seas touch the United States?
A playground ball has a diameter of 18 cm. What is the hieght and base of the ball? What is the volume?
which relationship between two species listed would be mutually beneficial A) a fish and a leech B) a dog and a tick C) a flower plant and a bee or D) a tree an
Are the graphs of y=3/8x -5 and y=3/8x +2 parallel?
how did the idea of manifest destiny help Americans justify their desire to extend the united state of the pacific ocean?
How is a euglena like a plant cell? How is it like an animal cell?Like a plant cell:Like an animal cell:
What is 14/12 reduce to its lowest term
Write a paragraph in Spanish about what your ideal holiday is... Please help me only need 5/6 lines
Express on simplest form in terms of i: sqrt-16