package com.ctgu.java.exer;
public class TestException {
public static void main(String[] args) {
//1.数组下标越界异常:
// int[] i = new int[10];
// i[0] = 90;
// i[9] = 99;
// for(int m =0; m<i.length;m++){
// System.out.println(i[m]);
// }
// //2空指针异常
// boolean[] b = new boolean[3];
// b = null;
// System.out.println(b[0]);
// TODO Auto-generated method stub
String[] str = new String[4];
//str[3] = new String("AA");
System.out.println(str[3].toString());
int[][] j = new int [3][];
j[2][0] = 12;
}
}
转载于:https://blog.51cto.com/9815936/1601104