Archive

Posts Tagged ‘java 9’

Java 9 got a REPL

September 23, 2017 Leave a comment

Java 9 came out a few days ago and it includes a REPL. This is a well-known thing among interpreted languages (e.g. Python), but it’s not very common in the case of compiled languages.

$ jshell
|  Welcome to JShell -- Version 9
|  For an introduction type: /help intro

jshell> int a = 3
a ==> 3

jshell> int b = 2
b ==> 2

jshell> a + b
$3 ==> 5

jshell> $3
$3 ==> 5

jshell>

Here is a more detailed blog post about jshell.

Note
jshell stands for Java Shell, and not for JavaScript Hell!

Categories: java Tags: , ,
Design a site like this with WordPress.com
Get started