[List of FAQs] | [Android FAQ] | [Samuh Varta]
vardhan reddy wrote:Hi All,
I want to assign same key but different values in hashmap, Map key is unique right
Ex:
like this I want to add, how can I achieve this in hashmap.
regards,
vardhan
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
The method put(String, String) in the type HashMap<String,String> is not applicable for the arguments
(String, List<String>)
vardhan reddy wrote:jay,
this the error::The method put(String, String) in the type HashMap<String,String> is not applicable for the arguments
(String, List<String>)
[My Blog]
All roads lead to JavaRanch
vardhan reddy wrote:
Garrett
the out put is banana only it will overried .
regards,
vardhan
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
[My Blog]
All roads lead to JavaRanch
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:That's quite nasty Garret.
What if you want to remove one of the values, but not the rest? Or iterate over all the values for one key?
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Let me tell you a story about a man named Jed. He made this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|