Suppose I have LinkedhashMap<String, List> myLHM = new LinkedHashMap<>()
Values of myLHM
:
<Roy,[1,2,3]>
<Roy,[14,15,16]>
<Neha,[1,5,6]>
<Neha,[11,12,13]>
<Jane,[11,8,9]>
In above eg., Roy
and Neha
is repetitive/duplicate.
Is it possible to hold duplicate keys in myLHM
? Because I'm not able to store duplicate keys
No? Then what is the alternative to LinkedHashMap
to hold duplicate keys?
TIA!
Edit: Those two Roy
and Neha
are each the same person