ArrayList
|
LinkedList
|
ArrayList
is implemented as a resizable array
|
LinkedList
is implemented as a Double LinkedList
|
As
more elements added to ArrayList, its size is increased dylnamically
|
LinkedList
performance on add & remove is better than ArrayList
|
ArrayList
elements can be accessed directly by calling get() and set() methods
|
LinkedList
worse on get() and set()methods
|
When
to use LinkedLIst:
- Your application can live with out random access because if you need nth element in LinkedList, you need to traverse upto nth element and then you can get data from that node.
- If your application have more insertion and deletion operations more than retrieval.
- LinkedList is much faster than ArrayList since removal does not involve resize.