how to get hashmap content of arraylist in java?
<p>I am using the following code to save hashmap content into arraylist. </p>

<pre><code>HashMap jediSaber = new HashMap();  
ArrayList&lt;HashMap&gt; valuesList = new ArrayList();

for(int i = 0; i&lt; 4;i++) {
    jediSaber.put("white","white_name"+i);  
    jediSaber.put("blue","blue_name"+i);   
    valuesList.add(i, jediSaber);           
    System.out.println("list ontent:"+i+":"+valuesList.get(i).values());
}

    `   
</code></pre>

<p>output is as follows:</p>

<pre><code>              list content:0:[blue_name0, white_name0]
              list content:1:[blue_name1, white_name1]
              list content:2:[blue_name2, white_name2]
              list content:3:[blue_name3, white_name3]
</code></pre>

<p>When i try to display the content of arraylist in outside with the following code,</p>

<pre><code>System.out.println("list content:");
for(int i = 0;i&lt;valuesList.size();i++){ 
    System.out.println("list:"+i+":"+valuesList.get(i).values());
}
</code></pre>

<p>It is showing the following output,</p>

<pre><code>             list content:0:[blue_name3, white_name3]
             list content:1:[blue_name3, white_name3]
             list content:2:[blue_name3, white_name3]
             list content:3:[blue_name3, white_name3]
</code></pre>

<p>My problem is i need to display the content of arraylist of hashmap. </p>

<p>I think something i missed in second part. Can anybody help me to solve this minor issue?</p>

<p>Thanks in advance!!..</p>
