Getting Started

There are a lot of ways to "get set up" to run Java code.

For the purposes of this book, I am going to reccomend that you start with replit.com.

It requires an internet connection and you will have to make an account, but of the available options it is the easiest to set up.

If you are in school and your teacher has helped you get set up in some other way it is okay to skip this section and just do it the way you were shown.

All that matters is that in the end you have the ability to run and edit the following code.

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

Step 1. Make an account

Go to replit.com and find the "Sign Up" button. Websites change every now and then so these screenshots might be out of date.

Picture of the sign up button on replit's website

Click it and sign up for an account.

Picture of the sign up form on replit's website

Step 2. Create a Java REPL

Find the "Create REPL" button and click it.

Picture of the create repl button on replit's website

Then you should be presented with a menu that lets you search for the type of REPL to create. Find the Java template and click "Create".

Unfilled in create from template menu on replit

Filled in create from template menu on replit

Step 3. Run code

You should land on a screen with a big green run button, an open file called "Main.java", and a blank window labeled "console".

Picture of an unran hello world program

Click it and you should see the text Hello, world! appear under the console window.

Picture of a hello world program after running