HiIf we want to store a key value pair where the same key may have more than one value which collection can we use (is there one for this situation ?)

Showing Answers 1 - 1 of 1 Answers

abhijith p

  • Dec 28th, 2006
 

You cannot have directly multiple values for a key. Anyhow there is a work around for this. You can have an array or arraylist which contains multiple values and put this arraylist in the map with a key. Like this you can have mulitple values with a single key.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions