Multiple Choice
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 ) ;
} // end if
Else
{
If ( temp < 70 )
{
System.out.println("This porridge is too cold.") ;
// warm up
Temp = temp + (temp < 50 ? 30 : 20) ;
} // end if
} // end else
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.
Correct Answer:

Verified
Correct Answer:
Verified
Q3: Sentinel-controlled repetition is also known as:<br>A)Definite repetition.<br>B)Indefinite
Q5: Which of the following segments is a
Q6: Which statement is false?<br>A)Both syntax errors and
Q7: How many times is the body of
Q10: What is output by the following Java
Q11: Which of the following operators associates from
Q24: Which of the following is the shape
Q25: Which of the following is not an
Q33: Which of the following is not a
Q34: The empty statement is denoted by what