Saturday, March 22, 2008

First Java Program with netbeans 6.1

It makes sense to try out the basic hello world program to check the IDE's core functionalities. So we go to File->New Project. This pops up the following screen that has so many types of projects that the IDE can handle!!

We select the basic Java Application and click Next. That brings us to the dialog where we name the project and set its working area. We let the default location stay and just name the project HelloWorld. Notice that the main class is automatically named.

Aha!! One of the major advantages of having an IDE is automatically generated code. See the window below, package, class and the main method structured well automatically. No difference from previous netbeans IDE’s as well, it’s the same saga going on(nobody asking for changes though :D).

Just type System. And see the pop up list of Intelligent IDE. Oooh IDE’s makes programmers life so easy. One note of caution though don’t use an IDE if you are a novice programmer because Intellisense really makes bad programmers.

Finalize the code as follows:

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

package helloworld;

/**

* @author Kiran

*/

public class Main {

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

System.out.println("Hello world");

}

}

Press F6 to run the program and notice that the Output panel appears….
Cool na?

2 comments:

Rahul Prabhu said...

Dude your description of this java IDE is cool.It is like a tutorial to novices.You have taken us through the basic functionalities of the IDE.Instead you should have spoken more about the advantages you have gained using the IDE.

Nadia Lawrence & Jake Lawrence said...

thk u shating this turorial with us...

god bless u