Site hosted by Angelfire.com: Build your free website today!
 

Hello World

Open up a shell window (xterm), use gedit or kedit to enter the following program.

class HelloWorld {
   public static void main(String[] args) {
        System.out.println("Hello world!");
   }
}
  • Everything of a program must be enclosed in a class

  • public static void main(String[] args) as in C is where the program execution starts

  • What does the statement System.out.println("Hello world") do? Let's look at the JavaDoc for some hints.