The Hello Application

// This is the Hello program in Java
class Hello {

    public static void main (String args[]) {
      /* Now let's say hello */
      System.out.println("Hello " + args[0]);


Compile this program as usual and then type java Hello Gloria. You should see something like the following:

% javac
% java Hello Gloria
Hello Gloria

Copyright 1996 Elliotte Rusty Harold
This Chapter