Playground

A place of your own for any Java you want to try: no steps, no checks, nothing to follow. Change Main.java, add files, break things. Your files live in the folder ~/playground and stay in this browser.

  • Run (Ctrl+Enter, ⌘↵ on a Mac) compiles every .java file in the folder and runs Main.
  • The files panel adds, renames and deletes files and folders; a folder is a package. Ctrl+B (⌘B on a Mac) in the editor shows or hides it, Ctrl+P (⌘P) opens a file by name.
  • The Terminal tab is a Linux shell: cd ~/playground, then javac, java or anything else.
  • Reset code in the ⋯ menu puts the starter Main.java back and deletes every other file in the folder.

Back to the course

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

Editor.sh · Learn to program by writing and running real code in your browser. Nothing to install; your work stays in this browser.

© 2026 xuwaters.com

Playground