记一次 NullPointerException
for each 语法要注意空指针
1 List<String> list = null; 2 for (String e : list) { // Exception in thread "main" java.lang.NullPointerException 3 }
for each 语法要注意空指针
1 List<String> list = null; 2 for (String e : list) { // Exception in thread "main" java.lang.NullPointerException 3 }