Examlex

Solved

What Is Output by the Following Java Code Segment? Int

question 10

Multiple Choice

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


Definitions:

Oncoming Serve

In sports, particularly in volleyball or tennis, refers to an approaching serve that a player must react to and defend against.

Dual Processing

The concept that the mind operates on two levels of processing, one automatic and unconscious, and the other effortful and conscious, affecting decision-making and judgment.

Conscious Awareness

The state of being aware of and attentive to one's surroundings, feelings, and thoughts.

Sixth Graders

Students who are in the sixth grade, typically aged 11 or 12, in the schooling system.

Related Questions