When I enter an expression in JShell (9.0.1) it comes back with:
$22 -> <value>
Where does the 22 come from and what's happened to $1 to $21? (They are undefined.)
I seem to vaguely remember (when I started with Java 9.0) that the variables started with $1, which made more sense. Now, with 9.0.1,they all start with $22. Why?
They are there, just do a
/list
to find the list of all. They are there because you seem to have already consumed 1 to 21[21 snippets/statements] until you reached the $22 -> <value>
snippet.
Trying to /reset
and then adding snippet should set you back :-
jshell> 0+1
$1 ==> 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With