Hello World - Java

Introduction: Hello World - Java

In this program we will learn how to print to the console in Java.


Step 1: Go to Jdoodle

Go to the Jdoodle website by clicking the link below:


You should get a page link the one in the picture.

Step 2: Getting to the Bread of Your Code

Select lines 3 through 7 and delete. This will leave you with the bread of your code. The words and brackets at the beginning are like the top slice of bread, and the brackets at the end are like your bottom slice. You will put your code in between, like the meat on a sandwich.

Step 3: Print Line

Next add System.out.println(); to the body of your code. This tells the compiler to print whatever is inside the parenthesis () to the console window. We add the semicolon ; at the end of each line to tell the compiler that line is over.

P.S. Make sure your code is typed exactly like mine. Even the capitalized letters have to be the same!

Step 4: Add a Message to Your Print

First you need to add quotations "" inside of your parenthesis (). This tells the program that whatever is inside the quotations "" is just normal text and does not need to be treated like code.

Next add a message inside your quotations. I am going to put "Hello World!"

Step 5: Execute!

Next press the blue execute button. This will run your code.

If everything is typed correctly, your message should print to the console window at the bottom! Congratulations! You are a programmer!

Be the First to Share


    • Robots Contest

      Robots Contest
    • Halloween Contest

      Halloween Contest
    • Space Contest

      Space Contest