1) Obtain object from first HashMap
2) (optional) Remove said object from first HashMap (depends on your requirements)
3) Insert said object into second HashMap
If you can't work it out from that, give up. If you couldn't work it out without the above, you may well be in over your head and perhaps need to re-visit a tutorial or 2
> > Map map1 = new HashMap();
> >
> > map1.put("Key1:,"value1);
> >
> > Map map2 = new HashMap();
> >
> > map2.put("key2", map1.get("key1"));
> >
> > :) hope this help u
>
> Interesting way to store null for "key2" in map2.
Would be if the thing would compile :-)
Take a closer look at line 2
> > > Map map1 = new HashMap();
> > >
> > > map1.put("Key1:,"value1);
> > >
> > > Map map2 = new HashMap();
> > >
> > > map2.put("key2", map1.get("key1"));
> > >
> > > :) hope this help u
> >
> > Interesting way to store null for "key2" in map2.
>
> Would be if the thing would compile :-)
>
> Take a closer look at line 2
Oh, cruel trick.
Well, take out the typos, and I read that you get value1 (with or without quotes) for "key2" in map2. Probably not what the OP wanted, but not in strict contradiction with what he or she asked for.
Teasing aside, RaviKumar.Avula, I'm curious to know whether you find that your question has been answered?