Hello World Starter

Hello World is the standard first program used to get acquainted with programming systems and languages.

Demos

Build | Build Main Project

Compiling 1 source file to /home/blue/students/public/emanon/nb/misc/helloworld/HelloWorld/build/classes
Copied 1 empty directory to 1 empty directory under /home/blue/students/public/emanon/nb/misc/helloworld/HelloWorld/build/classes
compile:
Created dir: /home/blue/students/public/emanon/nb/misc/helloworld/HelloWorld/dist
Building jar: /home/blue/students/public/emanon/nb/misc/helloworld/HelloWorld/dist/HelloWorld.jar
To run this application from the command line without Ant, try:
java -jar "/home/blue/students/public/emanon/nb/misc/helloworld/HelloWorld/dist/HelloWorld.jar"
jar:
BUILD SUCCESSFUL (total time: 0 seconds)

Run | Run Main Project

init:
deps-jar:
compile:
run:
Hello World!
BUILD SUCCESSFUL (total time: 1 second)

Code

/*
 * Main.java
 *
 * Created on May 28, 2006, 4:40 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package helloworld;

/**
 *
 * @author blue
 */
public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
    
}

Questions

  1. What is with all the comments? How may types of comments are there? What is each type used for?
  2. Is all this code really necessary just to write the hello world program? Why is it there?