As expected, array are faster than any container for random-access lookups and iteration. You can see that randomaccess(get())are cheap for ArrayList and expensive for LinkedLists. (Oddly, iteration is faster for a LInkedList than an ArrayList, which is a bit counterintuitve) On the other hand, insertion and removals from the middle of a list are dramatically cheaper ofr a LinkedList than for an ArrayList--especially removes.--<Thinking in JAVA>, 3rd Edtion. P554
ArrayList类add方法开销为分摊的常数,添加n个元素需要O(n)的时间。
而LinkList是链表他如果在中间操作将占优势.
搂主没有认真看看文档,文档中说,在对多条记录中进行插入,删除LinkList比ArrayList快,按顺序的话是ArrayList快。