dcsimg
Collection & Map
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kalpana_v
Posted On:   Friday, June 15, 2007 05:22 AM

When to use collections and when to use maps?Is there any difference in their storage mechanism?

Re: Collection & Map

Posted By:   rahul123  
Posted On:   Wednesday, December 18, 2013 03:54 AM

If you want to add a group of individual elements into a single unit then we should go for collection.
If you want to add a group of individual elements into a key-value pair then you should go for Map

Re: Collection & Map

Posted By:   Robert_Lybarger  
Posted On:   Friday, June 15, 2007 09:00 AM

Depends whether you just want a bunch of values (a, b, c, d) or you want a bunch of values tied to keys (a=1, b=2, c=3, d=4).
About | Sitemap | Contact