Examlex

Solved

What Is Output by the Following Java Code Segment

question 4

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


Definitions:

Modernity

A term referring to the period marked by the move from feudalism towards capitalism, industrialization, secularization, and the nation-state; represents the societal conditions and mindset resulting from these changes.

Capitalism

An economic system characterized by private or corporate ownership of capital goods, by investments determined by private decision, and by prices, production, and the distribution of goods determined primarily by competition in a free market.

Organic Solidarity

A type of social cohesion that arises when individuals in a society are interdependent but hold to varying tasks and responsibilities, characteristic of complex, industrial societies.

Collective Conscious

A shared set of beliefs, morals, and attitudes that operate as a unifying force within society; sometimes spelled as "collective conscience."

Related Questions