java.lang.IndexOutOfBoundsException: Index: 零, Size: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0java.lang.IndexOutOfBoundsException: Index: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

发生这种错误一般是:

List list=new ArrayList();

list.get(1);

list数组length为0,而你get(1),没有1这个索引