Thursday, March 14, 2013

Hello World Example


Java Hello World Example 

It is very simple in java to write the Hello World Example. In this Example, We just print the Text as Hello World Example on the console after executing this Program.

The below Example is very straight forward example, take the below code and just compile using from the  command prompt or you can use any tools like eclipse.

Use the Javac command to compile the java program, for Example Javac HelloWorld.java. Once you compile this program, the Java compiler compiles and generates the .class file. It is in the byte code format.

Then you execute this program by using java command for example java HelloWorld

Once you invoke the above command, we get the output as 'Hello World Example'.




 public HelloWorldExample{
  public static void main(String[] args){
   System.out.println("Hello World Example");  
  }
 }

0 comments:

Post a Comment

 
Disclaimer : If you find any mistakes / corrections / feedback Please let us know...This website author shall not accept liability or responsibility for any errors, mistakes or misstatements found in this website.