| Author |
Arraylist Vs LinkedHashMap
|
Naresh Chaurasia
Ranch Hand
Joined: May 18, 2005
Posts: 309
|
|
hi, i want to store some info. in a collection and then later on display it in jsp. The data in the collection does not change . Should i be using ArrayList or LikkenHashMap for faster access of data. pls give ur agruments. thnx in advance NC
|
SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
|
 |
Sanjaya Sugiarto
Ranch Hand
Joined: Mar 25, 2004
Posts: 229
|
|
|
ArrayList is faster
|
<a href="http://www.wi.hs-furtwangen.de" target="_blank" rel="nofollow">Business Information Technology - Hochschule Furtwangen University, Germany</a>
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
|
ArrayList is faster if all you're going to do is put data in, then iterate over all of it in the same order. If you need to do any looking-up by key, though, any Map (including LinkedHashMap) will be much faster.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: Arraylist Vs LinkedHashMap
|
|
|