how values of static members r regained after deserialization?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kam_bhat
Posted On:   Friday, January 6, 2006 03:27 PM

If static members of the class r not serialize during serialization then how can we get them back during deserialization?

Re: how values of static members r regained after deserialization?

Posted By:   Anonymous  
Posted On:   Thursday, January 19, 2006 02:26 AM

If they are declared with a value assignment, and are not assigned any values during processing, you can forget about them, - they will be there, like they were final static. If they are (re)assigned a value during processing
you may serialize/deserialize the static members just as you serialize the others.

Re: how values of static members r regained after deserialization?

Posted By:   ankush_purwar  
Posted On:   Friday, January 6, 2006 07:31 PM

static members belongs to class not related to object.
And we serialize the objects not the class.
So, when you deserialize the object, that will get the most recent value of the static member of the same class which object belongs to.
About | Sitemap | Contact