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

A soccer ball is kicked straight up from the ground with an initial velocity of 32 feet per second. Its height above ground in feet is given by: s(t)=-16t^2 +32
a sum of RS 500 is in the form of denominators of RS5 & RS 10..if the total no. of notes is 90 ,find the no. of notes of each type................
what are the rational numbers of -12,0,35,4.85,√12,√36,19/6,-10/11,1.4949949994
how do u express a ratio as a decimal
what is 12.345 rounded to the nearest tenth
Factor by grouping:4-12r+9r^2i know the answer is (2-3r)^2Can anyone explain to me how it is?
what are the rational numbers of -12,0,35,4.85,√12,√36,19/6,-10/11,1.4949949994
what is 12.345 rounded to the nearest tenth
resources are an integral part of human survival.yet indiscriminate use of them by humans has led to a crisis situation."discuss the above ststement in light of
What year did the Mayflower sail the ocean blue?