Java tutorial
Getting Started
On your own computer, install a JDK, save a file such as Main.java, then compile with javac Main.java and run it with java Main. The class name and the file name should match.
You do not need a local JDK to try the lessons here. The Run button uses a small teaching runner in your browser.
Edit the code and run it again. This runner stays in your browser and covers the syntax used in these lessons.
Output
Run the example to see output here.
What this code does
main is the starting point. Each println writes a line, so a successful run prints both messages in order.