David Laverdy wrote:How do I go about in the right direction getting the proper output for each Key ?
Impossible to say, since you haven't stated what you expect the output to be, or what the rules are you want to follow to produce that output, what it means to have "aaa" associated with both "111" and "555".
Note, though, that a Map by definition allows only one value per key.
The most common approach to what you seem to be asking would be to create a Map<String, List<String>>, but until you TellTheDetails(←click), that's just a guess.
Joined: Aug 14, 2011
I apologize for being a little vague, new to posting here. The output I should expect is
aaa has the values 111 555
bbb has the values 222 444
ccc has the value 333