Hello World!

The code must have been saved under the name hello.java to correspond with the name of the class that contains the procedure main, as shown on the first line of the following code.

To compile the program, type in the command:
javac hello.java

To execute the program, type in the command:
java hello


class hello
{
        public static void main(String args[])
        {
           System.out.println("Hello World!");
        }
}