Tuesday, November 23, 2010

Hello world in java

This blog is about how can u make a simple java program in your computer using netbeans.
 For this u need 2 things
1.The Java SE Development Kit 6 (JDK 6)
2.The NetBeans IDE


  • First u need to create a  new project in net beans
  1.                File->New project
  2.                select the java application as the project type.
  3.                In the Project Name field, type Hello World App.
  4.                In the Create Main Class field, type helloworldapp.HelloWorldApp.
  5.                Click finish.
  • Type the code
            Replace
// TODO code application logic here
with
System.out.println("Hello World!"); // Display the string
 
  • Compile the program
     
    Run->Build Main project
     
    Run the program
    Run->Run Main Projeect  
    You will get the output as above if u r successfully run the program. Dadaa thats ur first java pgm!!

1 comment: