Hey! Welcome back. Lets learn how to print to the console with Java.

1. Open up NetBeans and click the button that looks like a folder to create a new project environment.

2. Make sure “Java” is selected then hit continue.

3. Now name your project something meaningful and make sure to check the box that says “create main.”

4. Alright, you should now see something like this:

5. This might look weird at first, but don’t worry, all you need to know is that Java is an OOP or Object Oriented Programming language. Meaning Java code can be compartmentalized into segments that do specific tasks. However we don’t need to worry about that right now. All we need to worry about is writing out code inside the curly braces of the main method.

6. So just click inside the braces:

public class JavaHelloWorld {

    public static void main(String[] args) {
        
        //right here

    }

}

7. Now type:

 
public class JavaHelloWorld {

    public static void main(String[] args) {

        System.out.println("Hello World!");

    }

}

And don’t forget the semicolon! Java requires a semicolon at the end of every statement.
*ProTip: you can just type “sout” and hit Tab, and it will write the print statement for you.*

8. Now if you press the Green play button at the top of the screen it will run the code and you should see some output in the console that looks like this:

Hello World!

9. Awesome, check out my next tutorial to learn how variables work in Java!