dcsimg
collection which allows duplicate key values
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Chetan_Jain
Posted On:   Thursday, November 16, 2006 02:07 AM

is there any collection which allows duplicate key values.

eg.


key --- > value

abc --- > 123

abc --- > 456

Re: collection which allows duplicate key values

Posted By:   rahul123  
Posted On:   Tuesday, December 17, 2013 10:17 PM

We can strore data in key value format in Map interface
In map interface Key value is not allow duplicate . if you want to add  data in the same key then you can use value in list format

Re: collection which allows duplicate key values

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, November 16, 2006 03:32 AM

No, but you can store a List as the value, so you have :

key --- > value

abc --- > 123, 456
About | Sitemap | Contact