Java
Java online compiler
Run Java online: compile a class with a main method and type input in a live terminal. Free, no sign-up, and it works on a phone.
About this Java compiler
Java remains a staple in education and enterprise. Paste one public class (named Main in our samples) and run it with optional stdin.
Questions and answers
- Do I need a class called Main?
- No class is needed: a file with just a main method runs, as the sample shows. If you do write a class, any name works; the file is run straight from source on Java 25.