How to print Hello World in Java

In this tutorial, you will learn to print “Hello World” program in Java.

A “Hello, World!” is a simple program that outputs Hello, World! on the screen. Since it’s a very simple program, it’s often used to introduce a new programming language to a beignners.

Let’s learn how Java “Hello, World!” program works.

Java “Hello, World!” Program

// Your First Program
 class HelloWorld {
     public static void main(String[] args) {
         System.out.println("Hello, World!");


Hello, World!

Was this article helpful?

Leave a Comment