Java lets you test one expression at a time at the JShell prompt, or compile whole source files with javac and run them with java. This lesson shows both workflows and how arguments reach main.
More lessons in Complete Core Java