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 @   Dylan_Java_NYC  阅读(301)  评论(0)    收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示