Question

When I was reading a book for SCJP, I came across the following paragraph.

A LinkedList is ordered by index position, like ArrayList, except that the elements are doubly-linked to one another. This linkage gives you new methods (beyond what you get from the List interface) for adding and removing from the beginning or end, which makes it an easy choice for implementing a stack or queue. Keep in mind that a LinkedList may iterate more slowly than an ArrayList, but it's a good choice when you need fast insertion and deletion..

What makes a LinkedList to iterate more slowly than an ArrayList ?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top