public boolean addAll(Collection<? extends E> c) {
Object[] a = c.toArray();
int numNew = a.length;
ensureCapacityInternal(size + numNew); // Increments modCount
System.arraycopy(a, 0, elementData, size, numNew);
size += numNew;
return numNew != 0;
}
I see that the time cost of addAll () is proportional to the number of inserts. I think it should be the same no matter how many inserts it is, or what is the mystery of System.arraycopy, the native method? please explain