JShell
We have already given some examples of JShell usage previously in this book. Here, we will take a more descriptive view of JShell. If you have worked in languages, such as Python or Ruby on Rails, you must have noticed the cool shell feature or Read-Eval-Print Loop (REPL) tool. The idea is to try out and experiment with the language before you go and do the real implementation. It was about time that Java added a similar feature to it.
Jshell is an easy way to get started with Java. You can write code snippets, see how they work, look at the behavior of different classes and methods without actually writing complete code, and play around with Java. Let's take a closer look to get a better understanding.
Let's start the shell first. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access