In this chapter, you will learn:
What the Java shell is
What the JShell tool and the JShell API are
How to configure the JShell tool
How to use the JShell tool to evaluate snippets of Java code
How to use the JShell API to evaluate snippets of Java code
All example programs in this chapter are a member of a jdojo.jshell module, as declared in Listing 23-1.
Listing 23-1. The Declaration of a jdojo.jshell Module
// module-info.java
module jdojo.jshell {
exports com.jdojo.jshell;
requires jdk.jshell;
}
Before you begin reading this chapter, let me clarify the usage of the following three ...