A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Reference or just a copy?
Joined: Feb 11, 2002
Feb 25, 2002 17:07:00
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?
Joined: Jan 30, 2000
Feb 25, 2002 17:34:00
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,
I agree. Here's the link:
subject: Reference or just a copy?
Use of memory == less? GC : Soft ref
Any way to accomplish this ?
is there any table like data structure in java ?
Hashtable casting error
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014