What is output by the following Java code segment?
```
int temp = 180;
if (temp > 90) {
System.out.println("This porridge is too hot.");
// cool down
temp = temp – (temp > 150 ? 100 : 20);
}
else {
if (temp < 70) {
System.out.println("This porridge is too cold.");
// warm up
temp = temp + (temp < 50 ? 30 : 20);
}
}
if (temp == 80) {
System.out.println("This porridge is just right!");
}
```
a. This porridge is too hot.
b. This porridge is too cold.
This porridge is just right!
c. This porridge is just right!
d. None of the above.
d. None of the above.
You might also like to view...
________ computers are present in such diverse applications as gasoline pumps, home appliances, and traffic lights
A) Embedded B) Distributed C) Grid D) Convertible
When you begin at the hash location and search the dictionary sequentially, this is called what?
a. closed addressing b. Horner’s rule c. linear probing d. inverse probing