List 的size是0时,get(0) 会报IndexOutOfBoundsException

LIist list = new ArrayList();

list.get(0); // IndexOutOfBoundsException

这个时候的数组没有index,长度是0

posted @ 2014-08-26 11:15  廖东海  阅读(538)  评论(0编辑  收藏  举报