This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.

on Page 542 : ArrayList : Choose this over a LinkedList when you need fast iteration but aren't as likely to be doing a lot of insertion and deletion.

AND

on page 544 : Although itwill be somewhat slower than HashMap for adding and removing elements, you can expect faster iteration with a LinkedHashMap.

This means that one must choose {ArrayList over LinkedList} and {LinkedHashMap over HashMap} for fast iteration. Is this correct or a typo (bug) as these 2 statements are oposite of each other...

It seems as though the book is correct due to LinkedHashMap actually using a LinkedList for iteration purposes. So what I'm assuming is that the LinkedList iteration is faster than HashMap iteration. So, LinkedHashMap is then faster for iteration than HashMap due to using that LinkedList.

-------------------------<br />SCJP 1.4 10/28/2006<br />SCWCD (next on the list!)