Implementing two HashMaps
<p>I am trying to implement a combination of two HashMaps.Below is my code,but i am not able to produce what i really wanted.
The result of my code is :</p>

<pre><code>{{userId1=clientID1}=timestamp1}
{{userId1=clientID1, userId2=clientID2}=timestamp2, {userId1=clientID1, userId2=clientID2}=timestamp1}
</code></pre>

<p>Actually i need :</p>

<pre><code>{{userId1=clientID1}=timestamp1},{userId2=clientID2}=timestamp2},{userId3=clientID3}=timestamp3}..}
</code></pre>

<p>that is ,one to one mapping.Can we really implement this requirement?If no can anybody suggest a way for this type of mapping.I will be really thankful...</p>

<pre><code>public static void main (String args[]) 
{
HashMap map = new HashMap&lt;String, String&gt;(); 
HashMap&lt;HashMap,String&gt;  multi = new HashMap();
map.put("userId1", "clientID1");
multi.put(map, "timestamp1");

System.out.println(multi);   //gives me correct requirement

map.put("userId2", "clientID2");
multi.put(map, "timestamp2");

System.out.println(multi);   //since the table is filled again a combination of values results(each time it keeps on increasing) which is not really required as per my requirement .Hope my problem is clear.please do help me ..
}
</code></pre>
