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");
}
```
a. no output
b. Income is greater than 3000
c. Income is greater than 3000 followed by Income is greater than 4000
d. Income is greater than 4000
e. Income is greater than 4000 followed by Income is greater than 3000
b. Income is greater than 3000
Since income is 4001, the condition (income > 3000) is true. So statement for the true case is executed.
You might also like to view...
____________ is a set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters.
a. UTF-8 b. Unicode c. ASCII d. IEEE
In Java it is possible to write a method that will return __________.
a. a whole number b. a reference to an object c. a string of characters d. Any of these
Which IPv6 transition mechanism treats the wide area IPv4 network as a unicast point-to-point link layer?
A. 6-to-4 B Teredo C. Dual Stack D. GRE tunnels
To remove red eye from a digital image, you would use software such as ________.
A. Adobe Photoshop B. Adobe Acrobat C. Microsoft PowerPoint D. Apple Keynote