DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Matthew is a DZone employee and has posted 155 posts at DZone. You can read more from them at their website. View Full User Profile

Java Hello World

02.02.2009
| 4591 views |
  • submit to reddit
        Put this code into HelloWorld.java then run `javac HelloWorld.java' followed by run `java HelloWorld'.

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

    

Comments

Snippets Manager replied on Sun, 2008/09/21 - 7:46am

Is this really worth typing? Sun has plenty of tutorials including, believe it not 'hello world'.