title: How two java object HashCode can be similar
body: <p>In below code i have two string object both are different object but i am getting the similar hashcode. how it's possible.</p>
  
  <p>public class ObjectHashCode {</p>
  
  <pre><code>    public static void main(String...mj){
  
              String str1 = new String("Aa");
              String str2 = new String("BB");
  
              System.out.println(str1.hashCode());//2112
              System.out.println(str2.hashCode());//2112
          }
  </code></pre>
  
  <p>}</p>