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

Which question can be answered using the scientific process
This is a shorthand way of writing very large or very small numbers, in which a number is expressed as a number between 1 and 10, times 10 raised to an exponent
At breakfast, a restaurant charges $2 for the first cup of orange juice and then $1 for each refill. Which graph represents this situation?
What was the real result of the fifteenth amendment?
Which term describes a tiny, membrane-bound structure inside a eukaryotic cell?
A detective must appear in a detective novel. true false
The table shows the average number of hours of daylight per day for the last four months of the year. What is the correlation coefficient for the data in the
When does georgia's special election take place?
What do Robert Smithson’s Spiral Jetty and the Great Serpent Mound have in common?
Which should be done in case of a laboratory accident?