A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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?
is there any table like data structure in java ?
Use of memory == less? GC : Soft ref
Hashtable casting error
Any way to accomplish this ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014