jshell the tool will be a command-line tool with features like a history of statements with editing, tab completion, automatic addition of needed terminal semicolons, and configurable predefined imports.
After downloading the JDK 9, set the PATH variable to access jshell. Now, we will see how to use jshell. Below is the simple program using jshell. We no need to write a class with public static void main(String args) method to run a simple hello world application.
Now we will write a method which will add two variables and invoke the method via jshell.
Now, we will create a static method with StringBuilder class without importing it, as jshell does that for you.
I hope you enjoyed jshell feature. In the next article, we will see another JDK 9 feature. Till then, Stay Tuned!!!