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

main reason of the alamo
Which category would a snake fall in? A. tertiary consumer b. secondary consumer C. primary consumer d. primary producer
How to write Manganese (iv) chloride
List and explain 4 dating rules that you and your parents or guardian should discuss.
Politically, the class of people who are more likely to feel that the government should intervene in the economy to make citizens financially secure are the
Brandon buys a radio for $43.99 in a state where the sales tax is 7% what is the total Brandon pays for the radio?
Which group was often targeted during draft riots in New York City? A. the government B. Southerners C. African Americans D. the wealthy classes
Pearl sent a box of 36 apples and oranges to her sister. if 5/9 of the shipment were apples, how many apples did she send?
Change 250ml into the ratio 7:3
What was the Manhattan Project? A. the last Japanese military offensive B. a secret U.S. project to develop nuclear bombs C. a Soviet Union military plan for co