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 婆婆高寿祝福语大全简短