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 importantJava
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.