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

Why did some states demand that the U.S. Constitution include a Bill of Rights?
Which of these is true of an inelastic collision between two objects in a closed system but not of an elastic collision? Total momentum is conserved. Total kine
The sum of the first and second of three consecutive even integers is 158. find the three even integers.
A dog, a girl, and ____________ are all of the characters in the novel that I'm reading. So far, it's a little slow, but I'm told that it gets better. Fill in
what groups might dispute european land claims in the west
Please help me with questions 27 and 28
Find all values of x in the interval [0, 2Ï] that satisfy the equation. (enter your answers as a comma-separated list.) 6 + 3 cos(2x) = 9 cos(x)
HELPPPPP MMMMEEEEEE PLZ
Objects do not cease to exist when they are out of view. this concept is referred to as primitive causality. scheme. object permanence. means-end relationship.
list all the prime numbers beteen 1-20