Zest.

Java: Hello world

A short, tested Java example for hello world. Copy it and adjust the names and paths for your project.

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

Run with: javac Main.java && java Main

Find it in Zest

Search for “java hello world” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.

More Java examples

All Java examples