/** * Hello Program, Honors Basic Algorithms, Fall 2000 (Yap) * * This Hello Program will compile and run properly in * the Windows environment as well as in Unix. * * After compiling it, you can run it with any number of * command line arguments. For example, try this: * * % java Hello How about this? * * @author Chee Yap */ public class Hello { public static void main (String[] args) { // Greeting message: System.out.print("Hello, World!\n"); // Print command line arguments, one per line: for (int i = 0; i < args.length ; i++ ) System.out.print(args[i]+"\n"); // Pause display until user hits return // Without this, the console application will // vanish too quickly in the Windows world! System.out.print("Please hit a return to quit"); try {System.in.read();} catch (Exception e){}; } // main } // class Hello