DevilKing's blog

冷灯看剑,剑上几分功名?炉香无需计苍生,纵一穿烟逝,万丈云埋,孤阳还照古陵

0%

Use Jshell

原文链接

A REPL is a simple, interactive programming environment that takes user input (Read), executes the user command (Evaluate), returns the result to the user (Print) and waits for the next user input (Loop). REPL

var部分的使用

一部分的自动补全

1
2
3
4
5
6
7
8
9
10
11
jshell> /imports
| import java.io.*
| import java.math.*
| import java.net.*
| import java.nio.file.*
| import java.util.*
| import java.util.concurrent.*
| import java.util.function.*
| import java.util.prefs.*
| import java.util.regex.*
| import java.util.stream.*
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
jshell> /vars
| String message = "medium"
| list $2 = (not-active)
..

jshell> /methods
| double volume(double)
| double cube(double)

jshell> /types
| class User

jshell> /imports
| import java.io.*
| import java.math.*
..