aspose file tools*
The moose likes Beginning Java and the fly likes Reference or just a copy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Reference or just a copy?" Watch "Reference or just a copy?" New topic
Author

Reference or just a copy?

David Duran
Ranch Hand

Joined: Feb 11, 2002
Posts: 122
If I do a get out of a hashtable and modify a member variable of the returned object, will that modification be mirrored in the hashtable or do I have to do a 'put' again?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
The hashtable returns a reference to the original object, not a copy - so it's been modified now. No need for a put.


"I'm not back." - Bill Harding, Twister
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reference or just a copy?
 
Similar Threads
HASHTABLE Problem
is there any table like data structure in java ?
Use of memory == less? GC : Soft ref
Hashtable casting error
Any way to accomplish this ?