Does JShell compiles statements or directly executes them?

86 Views Asked by At

Reading "Learning Java" by O'Reilly and getting familiar with how does the JDK work, I have come upon JShell. However, I'm not quite sure I understand how this REPL works deep down.

Does it compile each statement into bytecode and thereafter executes it with the help of the Java Virtual Machine (the way java source code is built and executed)? Or does it somehow uses some interpreter direclty to execute the statements, avoiding the compiling step?

0

There are 0 best solutions below