Difference between ArrayList and LinkedList is important interview question for Fresher and 2-3 years of experience (JAVA, android or other programming languages)
ArrayList LinkedList 1. It is the best choice if our frequent operation is retrieval. 1. It is the best choice if our frequent operation is insertion and deletion in the middle. 2. ArrayList is the worst choice if our frequent operation is insertion or deletion in the middle.
2. LinkedList is the worst choice if our frequent operation is retrieval operation. 3. Underlying datastructure for ArrayList is resizable or growable array. 3. Underlying datastructure is Double Linked List. 4. ArrayList implements Random Access interface 4. LinkedList doesn’t implement Random Access interface