title: Java - HashMap confusion about collision handling and the get() method
body: <p>I'm using a <code>HashMap</code> and I haven't been able to get a straight answer on how the <code>get()</code> method works in the case of collisions.</p>
  
  <p>Let's say <code>n &gt; 1</code> objects get placed in the same <strong>key</strong>.  Are they stored in a <code>LinkedList</code>?  Are they overwritten so that only the last object placed in that key exists there anymore?  Are they using some other collision method?</p>
  
  <p>If they are placed in a <code>LinkedList</code>, is there a way to retrieve that entire list?  If not, is there some other built in map for <strong>Java</strong> in which I can do this?</p>
  
  <p>For my purposes, separate chaining would be ideal, as if there are collisions, I need to be able to look through the list and get information about all the objects in it.  What would be the best way to do this in <strong>Java</strong>? </p>
  
  <p>Thanks for all your help!</p>