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
.javafile in the folder and runsMain. - 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, thenjavac,javaor anything else. - Reset code in the ⋯ menu puts the starter
Main.javaback and deletes every other file in the folder.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}