Differences between ArrayList and LinkedList

Both classes implement List interface. Order is the most important feature of a List; it promises to maintain elements in a particular sequence. Following are the main differences
1. An ArrayList implemented with Array, allowed fast random access to an element, while LinkedList are optimal for sequential access and are relatively slow for random access.
2. ArrayList is slow when inserting or removing element from middle of the List while LinkedList provide inexpensive insertion and deletion from the middle of the List.

Related Post

Differences between Vector and ArrayList
What do you know about Containers?
differences between the == operator and the equals() method in Java
Creating report in java using jasper
Generating jasper report in xls

Comments

Leave a Reply