How to iterate and print nested HashMap with Integer as value?
<p>I want to print a nested HashMap which is :</p>

<pre><code>HashMap&lt;Integer,HashMap&lt;Character,Integer&gt;&gt; map;
</code></pre>

<p>I searched a lot but I can't find a way to print the Integer because when I use getValues() on it, it tells me : "cannot find symbol". (Because it's an Integer value)</p>

<p>This is what I tried to do :</p>

<pre><code>public void print(){
   for(Map.Entry&lt;Integer, HashMap&lt;Character,Integer&gt;&gt; t :this.map.entrySet()){
     Integer key = t.getKey();
     for (Map.Entry&lt;Character,Integer&gt; e : this.map.getValue().entrySet())
       System.out.println("OuterKey:" + key + " InnerKey: " + e.getKey()+ " VALUE:" +e.getValue());
   }
}
</code></pre>

<p>I can't use getValue() in my second for, so what else can I use ?</p>

<p>Thanks in advance !
Have a nice day.
Chris.</p>