2008-12-01

Hello World, Java!

I Wr.Wb.

Well .. once you know how to download and install on the netbeans + java script before, now you are ready to start the program Hello World, Java first. Create a new project by following the steps below:

1. Netbeans IDE on the menu, select the File menu -> New Project.
2. In the New Project window, select Java in the Categories box, and select Java Application Projects in the box. Click the Next button.
3. Type the name of "Markers" in the Project Name box, and adjust the location of your project in the Project Location and project folders.
4. Remove the check on the option Create Main Class and the Set As Main Project. And click the Finish button.



1. Then right-click on the Projects window, and select New -> Java Class.
2. Type "HelloWorld" in the Class Name box, and click the Finish button.
3. Next, you can program the following code
  1. public class HelloWorld { 
    public static void main(String[] args){
    System.out.println("Hallo Dunia!\n");
    }
    }
4. Then press the Shift + F6 to mengkompile.
5. Result you can see in the Output window, or you can also go to the terminal, enter the location of your project, for example: "/ home / dedygunanto / NetBeansProjects / tutorials / build / classes." And type in command
  1. shell > java HelloWorld
  2. The result you can see in the picture below:


finish
http://dedygunanto.wordpress.com/

No comments: