JShell is an interactive REPL for Java added in JDK 9. It allows developers to instantly evaluate expressions, test classes, and experiment with the Java language.
Early access for jdk 9 can be obtained from: http://jdk.java.net/9/
$ jshell — Start the JShell REPL
jshell> /<command>...