title: Java usage of HashMap or Map with multidimensional arrays
body: <p>I would like to use <code>HashMaps&lt;String, V&gt;</code> where the value type <code>V</code> should be a two dimensional <code>int</code> array (<code>int[][]</code>).</p>
  
  <pre><code>Map&lt;String,int[][]&gt; map = new HashMap&lt;&gt;();
  int[][] a = new int[][]{ {1, 2} };
  map.put("test", a);
  System.out.println("Test:" + map.containsKey("test"));  // Test: true
  System.out.println("key ==== " + map.get("test"));      // Key === [[I@19a8942
  </code></pre>
  
  <p>I am trying to have a key that access a unique value i.e. a 2-dimensional array, the size of the array is fixed <code>array[1][3]</code>, this is constant. Number of keys will grow with time but not the arrays. For example:</p>
  
  <pre><code>Key1 -&gt; [no1, no2, no3]
  key2 -&gt; [no4, no5, no6]
  </code></pre>
  
  <ol>
  <li>I would like to access the array values, now I get an error.</li>
  <li>Is there a better way of implementing this?. Ideally I would like it to be sorted by keys.</li>
  </ol>
  
  <p>I am not an expert in Java but after some reading about maps I felt this works best for me.</p>