Home » Interview » Technology

How do you decide when to use ArrayList and When to use LinkedList?

Correct Answer: If you need to support random access, without inserting or removing elements from any place other than the end, then ArrayList offers the optimal collection If, however, you need to frequently add and remove elements from the middle of the list and only access the list elements sequentially, then LinkedList offers the better implementation

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion