NullPointerException:空指针异常类
示例:
package c;
public class Test {
public static void main(String[] args) {
tln(toUpper(null));
}
public static String toUpper(String str){
return perCase();
}
}
异常信息如下:Exception in thread "main" PointerException
at per()
at (:6)
ArrayIndexOutOfBoundsException:数组下标越界异常
示例:
package c;
public class Test {
public static void main(String[] args) {
int[] a = {0,1,2,3};
tln(a[4]);
}
}