1.var声明变量。
new Scannr(System.in).var:自动生成
变成-->String s = new String();
2.null判断对象为空。
list .null
if (list == null) {}
3.notnull判断对象非空。
list .notnull
if (list != null) {}
4.nn判断对象非空。
list.nn-->
if (list != null) {}
5.for遍历(增强型遍历)。
List list = new ArrayList();
list.for
变成-->
for (Object o : list) { }
6.fori遍历(带索引的遍历)。
list.fori
变成-->
List list = new ArrayList();
for (int i = 0; i < list.size(); i++) { }
7.not对布尔类型取反。
goods.getStockCount()<0.not
变成相反的goods.getStockCount() >= 0
8.if条件判断。
goods.getStockCount()<0.var
变成--> if (goods.getStockCount()<0) {}
9.cast强转对象/数据类型。
String str = new String();
str .cast
变成-->(Object) str
10.return返回值。
"yanggb".return
student.return
list.returnnew Student().return
快捷键【ctrl+j】可以查看所有可用的后缀补全列表
快捷键【ctrl+alt+t】直接生成try catch if 等代码