【发布时间】:2015-12-28 00:36:46
【问题描述】:
已经尝试过正常赋值并且:
Collections.copy(lostPackets, historyList);
抛出:
Exception in thread "Thread-3" java.lang.IndexOutOfBoundsException: Source does not fit in dest
有什么方法可以将 COWArrayList 复制到普通的 ArrayList 中?
【问题讨论】:
-
对于开发人员来说了解如何使用您打算使用的任何 API 的文档很重要,在这种情况下,java 有关于类详细信息的官方文档,也称为 javadocs,谷歌搜索你可以找到ArrayList javadoc
标签: java arraylist copyonwritearraylist