Deciding which "Collection type" to use
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Pantich
Posted On:   Thursday, November 7, 2002 11:30 AM

Hello,


Can anyone refer me to documentation or articles that explain how to determine which collection type to use. By collection type I mean array, list, vector, hashmap, etc.


It seems that others have also struggled with deciding which structure/type is the best for different situations. Any information would be greatly appreciated.

Re: Deciding which "Collection type" to use

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, November 7, 2002 02:42 PM

Look at the "Related Links", on this same jguru forum page.... lots of Collections FAQ's etc. you could have read first, before posting your question.

Re: Deciding which "Collection type" to use

Posted By:   Lasse_Koskela  
Posted On:   Thursday, November 7, 2002 01:18 PM

You really don't need an article. Just make yourself clear about the fundamental concepts: list, set, map.




  • A list (java.util.List) contains any number of items in a specific order and is suitable for various kinds of lists...


  • A set (java.util.Set) contains any number of items but without any specific order and a single item may exist multiple times.


  • A map (java.util.Map) contains mappings between keys and values. Each key is unique and each key is mapped into a single value, but the same value may be mapped for several keys.

About | Sitemap | Contact