Source code for InvalidValueExample2.java:

public class InvalidValueExample2
{
	public static void main(String args[])
	{
		// InvalidValueExample2
		int i = 20;
		if (i < 10)
		{
			System.out.println("Too small.");
			System.out.println("Invalid Value.");
		}
		System.out.println("Moving on.");
	}
}

Output from InvalidValueExample2.java:

Moving on.

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the InvalidValueExample2 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