title: How can i have a HashMap in Java with duplicate keys?
body: <p>I need a collection in Java that is going to store a pair, a key and a value.</p>
  
  <p>So I decided to use a <code>HashMap&lt;String,String&gt;</code>, but I noticed that when I try to add a key that already exists, the previous (key,value) is replaced by the new one (NewKey,NewValue) and the previous entry is lost. So when I have duplicate keys, the previous key is replaced by the new one.</p>
  
  <p>How can I have a HashMap with duplicate keys?</p>