copying hashmaps
<p>I have a structure </p>

<pre><code>HashMap&lt;String,HashMap&lt;Integer, HashMap&lt;Integer, question&gt;&gt;&gt; lang=new HashMap&lt;String,HashMap&lt;Integer, HashMap&lt;Integer, question&gt;&gt;&gt;();

HashMap&lt;Integer,HashMap&lt;Integer,question&gt;&gt; section= new HashMap&lt;Integer,HashMap&lt;Integer,question&gt;&gt;();
HashMap&lt;Integer,question&gt; questions= new HashMap&lt;Integer,question&gt;();
</code></pre>

<p>based on my logic I fill questions, section</p>

<pre><code>while(logic){
    for(someother logic){

        //make the skeleton structure of the object
        questions.add(integer,object);
    }
    section.add(integer,map3);
}
</code></pre>

<p>now I use this map2 as a skeleton and make changes </p>

<pre><code>HashMap&lt;Integer,HashMap&lt;Integer,object&gt;&gt; tempMap= new HashMap&lt;Integer,HashMap&lt;Integer,object&gt;&gt;();
while(logicnew){
    while(logic 2){
        tempMap = new HashMap(section);
        while(logic 3){
            tempMap2 = new HashMap(tempMap.get(integer));
            //make my changes
        }
    }
    lang.add(integer,tempMap);
}
</code></pre>

<p>Multiple languages have multiple sections, multiple sections have multiple questions.
The problem is the values are getting over written i.e. if I have french text in the first language and english text in the second language, I just see english text in both the lang maps I make.  Could you please tell what is wrong?  Let me know if there is any better way to do it.</p>

<p>Thanks!</p>
