title: Java HashMap with Int Array
body: <p>I am using this code to check that array is present in the <code>HashMap</code>:</p>
  
  <pre><code>public class Test {
      public static void main(String[] arg) {
          HashMap&lt;int[], String&gt; map = new HashMap&lt;int[], String&gt;();
          map.put(new int[]{1, 2}, "sun");
          System.out.println(map.containsKey((new int[]{1, 2})));
      }
  }
  </code></pre>
  
  <p>But this prints <code>False</code>. How can I check that array is present in the <code>HashMap</code>?</p>