Source code for TemperatureExample4.java:

public class TemperatureExample4
{
	public static void main(String args[])
	{
		// TemperatureExample4
		int temperature = 85;	// Change as needed.
		if (temperature >= 80)
		{
			System.out.println("warm");
			if (temperature < 90)
			{
				System.out.println(" but not too hot");
			}
		}
		// Done
	}
}

Output from TemperatureExample4.java:

warm but not too hot

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the TemperatureExample4 application at the momement. You need to compile and run the source code first.

To run this program:


Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR