In this tutorial, you will learn to write "Hello World" program in Java.
Because the program end up with print "Hello World" on the screen, so we always call it "Hello World" program,almost every one run their first program is "Hello Word" when they start learning Java.Since it's a simple program that very easy to understand, it often be use to introduce to a new java leaner.

Let‘s show you how to write the Hello World program:

Java "Hello World" Program

Output

Before learning how does it work,we should know what need to be contain in a tiny java program.
1.Class
A class should be defined as

Every java application need to contain at least one Class,in the Hello World program,the class name is "Hello world",for now, just remember that every Java application has a class definition, and the name of the class should match the filename in Java.

2.Main() method

In java, a application program executing start from the main method. and the code print "Hello World" in the main method ofter it running in the main method.

alse can refer to java offical doc getting start with java

.