Tooling Początkujący

Try Java expressions interactively without creating files.

✕ Java 8
// 1. Create Test.java
// 2. javac Test.java
// 3. java Test
// Just to test one expression!
✓ Java 9+
$ jshell
jshell> "hello".chars().count()
$1 ==> 5
jshell> List.of(1,2,3).reversed()
$2 ==> [3, 2, 1]
Widzisz problem z tym kodem? Daj nam znać.

Instant feedback

Type an expression, see the result immediately.

📝

No files needed

No .java files, no compilation step.

🔍

API exploration

Tab completion helps discover methods and parameters.

Stare podejście
Create File + Compile + Run
Nowoczesne podejście
jshell REPL
Od JDK
9
Poziom trudności
Początkujący
JShell for prototyping
Dostępne

Widely available since JDK 9 (Sept 2017)

JShell is a Read-Eval-Print Loop for Java. Test expressions, experiment with APIs, and prototype code without creating files, compiling, or writing a main method. Tab completion and inline docs included.

Udostępnij 𝕏 🦋 in