Java for students logo
Explore the English language on a new scale using AI-powered English language navigator.

"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.