Java 9中的JShell中Tab键的用途是什么?
当我们通过按Tab 键部分键入现有类,变量或方法 的名称时,JShell 还可以提供自动完成 功能。如果无法根据我们输入的内容确定项目,则提供可能的选项。
在JShell中按Tab键 执行以下任务之一:
如果没有其他名称与我们键入的名称匹配,则JShell将为我们输入其余名称。
如果有多个以相同字母开头的名称,那么JShell将显示这些名称的列表以帮助下一步输入内容,然后键入下一个字母,然后再次按Tab键 完成该名称。
如果没有名称与我们到目前为止键入的名称匹配,则会发出警报声 作为反馈。
示例
C:\Users\User>jshell
| Welcome to JShell -- Version 9.0.4
| For an introduction type: /help intro
jshell> String studentName(String firstName, String lastName)
...> {
...> return firstName + lastName;
...> }
| created method studentName(String, String)
jshell> /methods
| String studentName(String, String)
jshell> str <Press Tab Key>
studentName(
jshell> studentName(
studentName(
Signatures:
String studentName(String firstName, String lastName)
<press tab again to see documentation>
jshell> studentName(
String studentName(String firstName, String lastName)
<no documentation found>
<press tab again to see all possible completions; total possible completions: 545>热门推荐
10 分别发的祝福语简短
11 大外甥高考祝福语简短
12 小学毕业校长简短祝福语
13 搞工程发财祝福语简短
14 冬季祝福语男生文案简短
15 同事生子问候祝福语简短
16 退休文案寄语简短祝福语
17 送给自己的祝福语简短
18 简短祝福语毛笔字