This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I see that ArrayList is mainly for faster iteration and fast random access while LinkedList for faster insertion and deletion. Both are ordered but not sorted. My question is that "does anyone disagree if I say LinkedList is ordered by 'insertion order'(or last accessed order)?"
My question is that "does anyone disagree if I say LinkedList is ordered by 'insertion order'(or last accessed order)?"
I would tend to disagree. Yes, if you only use the add(Element) method, then the list would be in "insertion order", the order which the elements were inserted. However, the List also have the ability to add() at a particular index, so the order may not be the order the elements were added.