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 婶婶拜年祝福语大全简短