Test your knowledge
JShell is:
A Java 9 REPL.
An equivalent of
javac
in previous JDK versions.A Java 9 bytecode decompiler.
REPL means:
Run-Expand-Process-Loop.
Read-Evaluate-Process-Lock.
Read-Evaluate-Print-Loop.
Which of the following commands lists all the variables created in the current JShell session:
/variables
/vars
/list-all-variables
Which of the following commands lists all the methods created in the current JShell session:
/methods
/meth
/list-all-methods
Which of the following commands lists the source code evaluated so far in the current JShell session:
/source
/list
/list-source