package excise; import java.util.ArrayList; import java.util.List; public class Java快捷键 { public static void main(String[] args) { //sout System.out.println(); //字符串.sout "sfa".sout System.out.println("sfa"); boolean flag =true; //flag.if快速生成 if (flag) { } //flag.else if (!flag) { } //快速while flag.while while (flag) { } //new String("").var String s = new String(); //异常 int i=10/0;.try try { int i=10/0; } catch (Exception e) { e.printStackTrace(); } //List操作 List list = new ArrayList<>(); //快速foreach list.for for (Object o : list) { } //正向快速for循环 list.fori for (int i = 0; i < list.size(); i++) { } //反向快速for循环 list.forr for (int i = list.size() - 1; i >= 0; i--) { } } public int test() { //快速return 例如 10.rerutn return 10; } }