|
发表于 2020-1-4 06:06:01
|
显示全部楼层
Collections jdk 源代码
public static <T> void copy(List<? super T> dest, List<? extends T> src) {
int srcSize = src.size(); //源数组
if (srcSize > dest.size())
throw new IndexOutOfBoundsException("Source does not fit in dest");
//若源数组的size() > 目标数组的size()则抛出IndexOutOfBoundsException |
|