macOS / binaries /

jshell

/usr/bin/jshell
Interactively evaluate declarations, statements, and expressions of the Java programming language in a read-eval-print loop

JShell provides a way to interactively evaluate declarations, statements, and expressions of the Java programming language, making it easier to learn the language, explore unfamiliar code and APIs, and prototype complex code. Java statements, variable definitions, method definitions, class definitions, import statements, and expressions are accepted. The bits of code entered are called snippets.