1.数组常见问题
(1)int [ ] arr = new int[3];
System.out.println(arr[3]);
报错ArrayIndexOutOfBoundsException,数组角标越界
(2)String str = "ababcde";
System.out.println(str.charAt(7));
报错StringIndexOutBoundsException,字符串角标越界
(2)int [ ] arr = new int[3];
arr = null;//将arr的数组指向取消
System.out.println(arr[0]);
报错NullPointerException,空指针异常