3.5.1 The code

Previous Index Next 


The application will all be contained within one class called HelloWorld. The class is defined as follows:
1: public class HelloWorld
2:  {
3:   public static void main(String[] args)
4:    {
5:     System.out.println("Hello World !");
6:    }
7:  }

Open up a text editor and copy the class declaration above excluding the line numbering. Save the file as HelloWorld.java (note the placing of the capital letters).

Now stepping through each of the lines in the code: