- 自动导包,自动删包。
- if与else自动补全
boolean flag = true;
if (flag) {
}
if (!flag) {
}
- for/while自动生成循环体
for (int i = 0; i < 10; i++) {
}
while (flag) {
}
- var变量自动补全
String s = new String();
- return快捷键
int test() {
return 10;
}
- sout, soutv快速输出
//“Hello”.sout输出 System.out.println(“Hello”); //name.soutv输出 String name = “lily”; System.out.println("name = " + name); - try快捷键
try {
int i = 10/0;
} catch (Exception e) {
e.printStackTrace();
}
- for生成list循环
List<Integer> list = Arrays.asList(1, 2, 4);
for (Integer integer : list) {
}
for (int i = 0; i < list.size(); i++) {
}
for (int i = list.size() - 1; i >= 0; i--) {
}
Iterator<Integer> iterator = list.iterator();
while (iterator.hasNext()) {
}
|