title: How do I access individual values within a string array within a Hashmap?
body: <p>My declaration of the map is as follows:</p>
  
  <pre><code>Map&lt;Integer, String[]&gt; mapVar = new HashMap&lt;Integer, String[]&gt;();
  </code></pre>
  
  <p>And I initialized it by making several string arrays and putting them into my map with a corresponding Integer.</p>
  
  <p>I would like to then Iterate through all of the elements in my String array within the map.
  I tried these two possiblities but they're not giving me the right values:</p>
  
  <pre><code>for(int ii =0; ii &lt; 2; ii++)
    System.out.println(((HashMap&lt;Integer, String[]&gt;)mapVar).values().toArray()[ii].toString());
  </code></pre>
  
  <p>and</p>
  
  <pre><code>mapVar.values().toString();
  </code></pre>
  
  <p>I also know the array and Integer are going into the map fine, I just don't know how to access them.</p>
  
  <p>Thanks</p>