ArrayList实现原理

ArrayList先new10个,然后在动态扩容。

Arrays.copyOf(elementData, size);

System.arraycopy(elementData, 0, a, 0, size);

posted @ 2017-07-04 09:50  任国强  阅读(167)  评论(0编辑  收藏  举报