JShell
JShell is a Java read-eval-print loop which was first introduced in the JDK 9. It is tracked by JEP 222 jshell: The Java Shell . One reason why JShell was proposed for Java 9 is the lack of a standard interactive environment for the language; the de facto library to use a Java REPL was often BeanShell, which has been dormant since 2003, and arbitrarily diverged from the Java language.
Example
jshell> int a =
a > int
jshell> int fact
jshell> for
...> a = fact;
jshell> a
a > int