Java67 - Java Program Example Tutorial Blog

Java67 - Java Program Example Tutorial Blog


Difference between ArrayList vs LinkedList in Java with Example

Posted: 27 Dec 2012 02:47 AM PST

ArrayList and LinkedList are two popular concrete implementation of List Collection class in Java. Being List implementation both ArrayList and LinkedList are ordered, index based and allows duplicate but despite being from same type hierarchy there are lot of difference between ArrayList and LinkedList in Java. Main difference between ArrayList vs LinkedList is that former is backed by Array while LinkedList is based upon LinkedList data structure which makes performance of add(), remove() and iterator() different for both ArrayList and LinkedList. Difference between ArrayList and LinkedList is also an important  Java collection interview questions, as much popular as Vector vs ArrayList or HashMap vs HashSet in Java. Some time this is also asked as When to use LinkedList and When to use ArrayList in Java. In this Java collection tutorial we will compare LinkedList vs ArrayList on various parameter which will help us to decide when to use ArrayList over LinkedList in Java.
Read more »


Post a Comment