What is difference between ArrayList and Linked List?

ArrayList vs LinkedList
1. The underlying data structure is resizable or growable array.
The underlying data structure is Double Linked List.
2. This is Best choice if frequent operation is retrieval and worst choice if frequent operation is insertion or deletion in the middle.
This is Best choice if frequent operation is insertion or deletion in the middle and worst choice if frequent operation is retrieval .
3. This class implements Serializable , Cloneable and RandomAccess interfaces.
This class implements Serializable , Cloneable but not RandomAccess interface.

No comments:

Post a Comment