// MyProgram.java // A very simple console program to demonstrate packaging for deployment. import java.util.Scanner; public class MyProgram { public static void main(String[] args) { System.out.println("This is a simple console program to demonstrate"); System.out.println("packaging for deployment."); System.out.println(); System.out.println("By 'simple', we mean that this program does not use"); System.out.println("resources (like jpeg's), does not read/write files,"); System.out.println("nor anything else that would require more advanced"); System.out.println("packaging/deployment techniques"); System.out.println(); Scanner scanner = new Scanner(System.in); while (true) { System.out.print("Enter an integer (or 'q' to quit): "); if (!scanner.hasNextInt()) { if (scanner.next().toLowerCase().startsWith("q")) break; else System.out.println("Please follow directions!"); } else { int n = scanner.nextInt(); System.out.println((n % 2 == 0) ? "EVEN!" : "ODD!"); } } System.out.println("Bye!!!"); } }