How to quit the JShell and go back to the command-line?

JavaJava 9Jshell

Java Problem Overview


When using the JShell, how do I exit it back to the CMD line?

I have already tried ctrl + x and just writing quit, but to no joy.

Java Solutions


Solution 1 - Java

You can use the JShell command to exit as:

/exit

Side note: Interestingly, with the use of command abbreviations for input shortcuts:-

/ex

(of course /exi) also, resolves into the same command.

enter image description here

Solution 2 - Java

inorder to exit from jshell you can use the command /exit

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBrynView Question on Stackoverflow
Solution 1 - JavaNamanView Answer on Stackoverflow
Solution 2 - JavaGOKUL KANNAMBALLY BALACHNADRANView Answer on Stackoverflow