Examlex

Solved

What Is Output by the Following Java Code Segment? Int

question 9

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!" ) ;


Definitions:

Regional Metamorphism

The process of transformation of rocks by heat and pressure over wide areas of the Earth's crust, typically associated with mountain building.

Low Pressure

A condition in the atmosphere where the air pressure is lower than the surrounding area, often leading to cloud formation and precipitation.

High Temperature

A condition or measurement that indicates an amount of heat which is significantly above room temperature or the standard reference point for temperature.

Metamorphism

the process by which rocks are changed by heat, pressure, and chemical processes, resulting in metamorphic rock.

Related Questions