Source code for InvalidValueExample1.java:

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

Output from InvalidValueExample1.java:

Invalid Value. Moving on.

--- Output Ends ---

NOTE:

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