Learn Java
0/26
Lesson 1 of 26

Java Basics

Hello, World!

Every Java program lives inside a class, and the code runs inside a special method called main. To print a line, use System.out.println(...) with your text in double quotes. Statements end with a semicolon ;.

Your Task

Inside main, print exactly: Hello, World!

System.out.println("Hello, World!");
Main.java
Output
Press "Run Code" to execute your program.
🚀

Ready to run your code?

Create a free account to run code, get instant feedback, and save your progress. No credit card, free forever.

Create Free Account

Already have one? Log in