title: Can an array be used as a HashMap key?
body: <p>If a <code>HashMap</code>'s key is a <code>String[]</code> array:</p>
  <pre class="lang-java prettyprint-override"><code>HashMap&lt;String[], String&gt; pathMap;
  </code></pre>
  <p>Can you access the map by using a newly created <code>String[]</code> array, or does it have to be the same <code>String[]</code> object?</p>
  <pre class="lang-java prettyprint-override"><code>pathMap = new HashMap&lt;&gt;(new String[]{&quot;korey&quot;, &quot;docs&quot;}, &quot;/home/korey/docs&quot;);
  String path = pathMap.get(new String[]{&quot;korey&quot;, &quot;docs&quot;});
  </code></pre>