Java Introduction
Java is one of the world's most popular programming languages. It runs banks, Android apps, games like Minecraft and huge web services. Java code is compiled to bytecode that runs on the Java Virtual Machine (JVM), so the same program runs on Windows, macOS and Linux.
Every Java program lives inside a class, and starts running in a method called main. Here is the classic first program:
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}Hello, World!
System.out.println prints a line of text. The code examples in this course are read-only: copy one into a file called Main.java and run it on your own computer with java Main.java, or in an online Java editor. The output shown under each example is the real output from running it.
Where does a Java program start running?
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.