碼程式碼
1. 縮寫功能
-
方式:一般取首字母即可
-
例子 :
public static void main(String[] args){}
可以用 psvm
出來

System.out.printf("");
可以用 souf
打出來

2. 建立新函式
-
方式: 選中目標函式,
alt + enter
即可 -
例子:
要加的函式:

private static void newfun(int i, String aa) {
}
複製程式碼
3. 加 surround,如if、catch
-
方式: 選中目的碼段,
ctrl + alt + t
再選擇surround型別 -
例子:
要加的程式碼:
Thread.sleep(300);
複製程式碼
選中,再ctrl + alt + t
:

try {
Thread.sleep(300);
} catch (Exception e) {
e.printStackTrace();
}
複製程式碼