Hello World Program in Java

Hi Everyone ,

Today I am going to start new Tutorial Series of JAVA for all the beginners who are about to start learning JAVA
So In this series I will only talk about the coding aspect of JAVA , i’ll not cover the theoretical aspect of JAVA Language .

So lets start !!

 First program every student write while start learning any program is hello world program.

Below is the code of hello world program.

public class HelloWorld {

    public static void main(String[] args) {

        System.out.println(“Hello World”);



Compiler the Above Program-
  • Write the above code in notepad and save it as HelloWorld.java (same as the class name )
  • Open the command prompt and navigate to the saved location 
  • To compile the code write below (assumption java is installed in the system)
    javac HelloWorld.java
  • Above command will create new file named as HelloWorld.class

Run the Program –

  • Follow above compiled step first then run below command

    java HelloWorld 

This is how we will run over first program in java 

If you have any problem , do leave me comment , I will try to solve your problem.

Add a Comment

Your email address will not be published. Required fields are marked *