Hi folks Dinesh Krishnan(Online Java Trainer) here To write and execute the simple Hello World Program in Java Language. First make sure you have following requirements on your machine.

[su_list icon=”icon: arrow-circle-o-right”]

  • JDK(Java Development Kit)
  • JRE(Java Runtime Environment)
  • Text Editor


Step 1: Open the any text editor such as (Subline Editor, NotePad++ and etc).
Step 2: Type the following code in the text editor

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

Step 3: Save the file as HelloWorld.java (Note: Make sure your file name and class name are same).
Step 4: Open the Command prompt or Terminal on your machine and point the directory where the HelloWorld.java file was saved.
Step 5: Compile the file by executing the command such as javac HelloWorld.java then you can see class file that is generated in same directory name as HelloWorld.class
Step 6: Run the program by the command such as java HelloWorld

Finally you can see the output as “Hello World” in the console.

[su_youtube_advanced url=”https://www.youtube.com/watch?v=gpd-AwoKius”]

Note: Hi friends, If you are looking One to One Online Java Trainer please don`t hesitate to contact me. I am Online Java Trainer have been helping many students and professionals across the globe to gain more knowledge on the Java, J2EE, Spring, Hibernate, Struts, AKKA, UI and other frameworks by doing Online Java Training. you can call or whatsapp to +91 9941937705 anytime.


One response

Leave a Reply

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