| Author |
Deep Copying HashMap
|
V Bose
Ranch Hand
Joined: Jul 10, 2003
Posts: 113
|
|
If I construct a new HashMap from an existing one like is it a deep copy of the 'original' HashMap.
|
 |
Dan Chisholm
Ranch Hand
Joined: Jul 02, 2002
Posts: 1865
|
|
The two HashMaps will contain unique maps, but the maps reference the same objects.
|
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
|
 |
Dirk Schreckmann
Sheriff
Joined: Dec 10, 2001
Posts: 7023
|
|
|
Moving this to the Intermediate forum...
|
[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
|
 |
farhan java
Greenhorn
Joined: Jun 05, 2006
Posts: 1
|
|
so anybody knows the solution how to copy hashmap into another hashmap with the key-value pair, without haveing same refernce. please reply urgently.
|
 |
 |
|
|
subject: Deep Copying HashMap
|
|
|