// Hello, world!
// save into a file named "MyHello.java"

import java.lang.*;                         // not necessary in this case

public class MyHello                        // class declaration
{
                                            // Classes are composed of members.
                                            // The only member in this class
                                            // is the main() method.

  public static void main( String[] args)   // method declaration
                                            // The public static void main method 
                                            // with a String array argument makes
                                            // the class invocable as an application.
  {
                                            // Methods are composed of statements.
                                            // This method has only one such statement. 

    System.out.println("Hello, world!");    // method call statement
  }                                         // end of method/member body  
}                                           // end of class definition 


1