jshell> var x=8 x ==> 8 jshell> x*3 $2 ==> 24
But I haven't used it either as I never worked with a REPL other than SQL clients.