Anna Wierciak

After you installed Eclipse in the previous lesson, you should have a code block inside the Eclipse editor that looks like this:

public class HelloWorld {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
    }
}

For the moment, ignore all the text around the inner curly braces, and just remember that whatever is inside them, runs.

Remove the line that starts with // TODO.

Add the following line of code inside the inner curly braces: System.out.println(“Hello, World!”);

Like so:

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

Now click on a green icon with a triangle inside that looks like the Play button.

In the bottom panel you will see Console tab that opens that now shows “Hello, World!”

Congratulations! You wrote your first code!