Java Program Hello world is a quite simple program. In Java we use System.out.println(“text”) to print desired text. As a beginner, we need not know all the complexities that lie behind the keywords. We just need to know the syntax and how they behave in order to use them. However, if you are curious, a brief description is provided below.

java icon transparent png

Java Program Hello World Example Code

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


Java Hello World

Java Program Hello World: Points to Note

All the symbols and text used in the format of code cannot be changed. Java is a case sensitive language. In the above code at line 1 we can enter any class name we want. At line 2 we define the main method with the keywords –

  1. public – access specifier (all classes in every package can access)
  2. static – a static member is a member of a class that isn’t associated with an instance of a class. Instead, the member belongs to the class itself. As a result, we can access the static member without first creating a class instance.
  3. void – return type: the method does not return any value.

Java main method signature:

java main method signature explained

If you are a beginner then don’t go looking deep under these keywords at the very beginning. Learn the syntax and start coding. See how the program flow works. Do some experiments, see how the compiler behaves.

What is Java?

Java is a popular programming language, created in 1995.
Oracle is the owner of Java, and more than 3 billion devices run Java.

It is used for:

  • Mobile applications (especially Android apps)
  • Desktop applications
  • Web applications
  • Web servers and application servers
  • Games
  • Database connection
  • And much more!

Why Use Java?

  • Java is platform independent-because it creates byte code by compiling the code which serves as an instruction set for JVM
  • It is one of the most popular programming languages in the world
  • Easy to learn and simple to use
  • It is open-source and free
  • Java is secure, fast, and powerful
  • It has huge community support (tens of millions of developers)
  • Java is an object-oriented language.
  • As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa

History of Java

The history of Java is very interesting. The history of Java starts with the Green Team. Java team members (also known as Green Team), initiated this project to develop a language for digital devices such as set-top boxes, televisions, etc. However, internet programming suited Java. Later, Java technology was incorporated by Netscape.

James Gosling

James Gosling and his team members started the project in the early ’90s. James Gosling is known as the father of Java.

Today, in internet programming, mobile devices, games, e-business solutions, etc. Java is one of the best choices.

We have more java topics to read feel free to check them out. Or if you need any help with Java homework Help? Let us know