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 group is public health designed to protect and improve the health of?
Find the number of moles in a 28.0g sample of NH3. PLS URGENTLY
what is the climat means in English grammar?​
please help me answer these three question 20 points 1) Some southerners argued that slavery was actually GOOD for many slaves. What was their reasoning? 2) Why
Correct glove use requires which of the following:
A coffee cup filled with boiling water loses 10,000 J at 100°C. How much water is in the cup?
please help me 8x-3+4x+3​
Which of the following represents the sum of the series below? 4 + 7 + 10 + 13 + 16 + 19 + 22 + 25 + 28 +31 + 34 + 37 + 40 བ( 13:40) + 2 о 13 4+40 2 40=3+(n-1)4
With the exception of each of the following countries were considered “friends” of the USA during World War I. A. Britain B. France C. Germany
Abolitionist rallies often featured formerly enslaved speakers such as _____. A. William Lloyd Garrison B. Sojourner Truth C. Nat Turner D. Elizabeth Cady S