/** * A simple Java program that says hello to the world (or anyone else). */ public class Hello { /** * Every Java program needs a "main" method. * @param args Any additional strings that were included on the command line. */ public static void main ( String [] args ) { // Display "Hello World!" if no additional strings were passed. if ( args.length < 1 ) System.out.println( "Hello World!" ); else // otherwise, say "Hello" to every string argument passed. for ( int i=0; i < args.length; i++ ) System.out.println( "Hello " + args[i] + "!" ); } }