What is output by the following Java code segment? int temp = 180;

```
while (temp != 80) {
if (temp > 90) {
System.out.print("This porridge is too hot! ");

// cool down
temp = temp – (temp > 150 ? 100 : 20);
}
else {
if (temp < 70) {
System.out.print("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 cold! This porridge is just right!
b. This porridge is too hot! This porridge is just right!
c. This porridge is just right!
d. None of the above.


b. This porridge is too hot! This porridge is just right!

Computer Science & Information Technology

You might also like to view...

What is the event when a value is selected with the DateTimePicker control?

a) ValueChanged b) DateTimeModified c) DateModified d) TimeModified

Computer Science & Information Technology

Experiment by calling the file utility with the names of files in /usr/bin. How many different types of files are there?

What will be an ideal response?

Computer Science & Information Technology

Social media are categorized into four groups: social networking, ___________ networking, content communities, and online communications.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The symbol (@), used to suppress error messages, is called ____.

a. suppression operator c. null operator b. error control operator d. no_error operator

Computer Science & Information Technology