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.


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

相关文章: