title: Bad idea to use String key in HashMap?
body: <p>I understand that the String class' <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#hashCode()" rel="noreferrer">hashCode()</a> method is <em>not</em> guarantied to generate unique hash codes for distinct String-s.  I see a lot of usage of putting String keys into HashMap-s (using the default String hashCode() method).  A lot of this usage could result in significant application issues if a map <code>put</code> displaced a HashMap entry that was previously put onto the map with a truely distinct String key.  </p>
  
  <p>What are the odds that you will run into the scenario where String.hashCode() returns the same value for distinct String-s?  How do developers work around this issue when the key is a String?</p>