I'm learning to use jshell, and tried to write a snippet of code in the edit pad.
When hitting accept, if all the code is in the window only the first line is processed and saved. If I close and open the edit pad, all other lines vanish.
I can use the edit pad if I input the lines one at a time and hit accept after every one, but then it's no different than just writing in the command prompt.
I'm using JShell 10.0.2.
Starting
JDK 12, it runs multiple lines when you hitAcceptinJShell Edit Pad. Just make sure you start freshJShell Edit Padby resetting as below: