Java: Difference between ArrayList and LinkedList

Basically, they are just two different implementations of List interface.

LinkedList is implemented with a double-linked list; ArrayList is implemented with a dynamically resizing array.


所以基本的区别于list和array的区别很像,就是for random access, ArrayList is better; for adding and deleting, LinkedList is better.

LinkedList takes more space since it has to store both previous and next pointer. So large lists prefer arrayList.


版权声明:本文为博主原创文章,未经博主允许不得转载。

posted @ 2015-08-03 11:32  Dylan_Java_NYC  阅读(298)  评论(0编辑  收藏  举报