Get startedGet started for free

Your first Java code

It's time to run your first Java code!

Note: You do not need to change the code in this exercise.

This exercise is part of the course

Introduction to Java

View Course

Exercise instructions

  • Press the Run Code button to execute the Java code and see the results in the Output area.
  • Press the Submit Answer (or Submit) button to proceed to the next exercise.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

// You learned about class in the previous video
class WelcomeToJava {

	// You'll learn about the main method next
    public static void main(String[] args) {
    
    	// You'll learn about println statements too!
    	System.out.println("Welcome to Introduction to Java!");
    }
}
Edit and Run Code