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>热门推荐
3 祝福语简短的微信
10 幼儿祝福语大全简短贺卡
11 感谢教官文案祝福语简短
12 鼠年同事祝福语简短创意
13 元旦祝福语 简短独特群发
14 妈咪跟我生日祝福语简短
15 给儿子新婚祝福语简短
16 伴娘祝福语长文案简短
17 恭喜高考完祝福语简短
18 生日祝福语送老公简短