我是java 9的新手,只是在jshell上练习一些代码片段
jshell> System.out.println("hello");
hello
jshell> System.out.println("hello")
hello
在这两种情况下,我得到hello
的输出,但jshell
在行尾没有分号。我知道java需要分号
Jshell
自动添加分号。 Doc-Page-2-1或here
将Java代码片段输入JShell并立即进行评估。显示有关结果,执行的操作以及发生的任何错误的反馈
Note:
Terminating semicolons are automatically added to the end of a complete snippet if not entered.