Java for students logo
Need help with Java programming assignment? Get affordable Java homework help.

"Hello world!" code snippet

Abstract

Java program printing "Hello world!" string to the console.

Source code

HelloWorld.java

class HelloWorld {

      public static void main(String[] args) {

            System.out.println("Hello World!");

      }

}

Download HelloWorld.java

Sample run

Hello World!

 

Extra

Check for explanation here: Hello world program line by line.