Posted by : Unknown Wednesday, 10 June 2015

Create a file vijay.java with following code:

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

Now u can compile it using file name like,

javac vijay.java

and run using class name like,
 
java HelloWorld

Output:

Hello World!

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Translate

Popular Post

Total Pageviews

Blog Archive

- Copyright © Learning Java Program - Powered by Blogger -