ArrayList<Integer> arrayList = new ArrayList<Integer>(); //arrayList.size()
//Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 10, Size: 0
//arrayList.get(10);
String[] s= new String[]{"hello"}; //s.length
//Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 6
//System.out.println(s[6]);
HashMap<Integer, String> hashMap = new HashMap<Integer, String>();//hashMap.size()
//null,它却不会报异常,正常运行,只是返回的结果是null,????????比较比较 区别 区别
hashMap.get(110);
IndexOutOfBoundsException
最新推荐文章于 2024-06-26 13:26:30 发布