dcsimg
Can Static Variables be Serliazable
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RavuriVenkata_RamaKrishna
Posted On:   Friday, October 7, 2005 08:56 AM


Can we make static variables Serializabe?If not how to make them Serializable?
Thanks in advance.

Re: Can Static Variables be Serliazable

Posted By:   Anonymous  
Posted On:   Friday, December 16, 2005 04:19 AM

there is a special case for makeing the static variables serialized.
in this case we have to give our implementations for the
readObject() and writeObject() method.
if u want code for this one i can give the code.............

with regards
A.srinivas

Re: Can Static Variables be Serliazable

Posted By:   srini_vasan  
Posted On:   Wednesday, October 12, 2005 06:31 AM

Hi,



u can serialize the static fields like non-static
fields.
But if u want to avoid serializing fields, just put


transient infront of that memeber variable.



thanks,

srini

Re: Can Static Variables be Serliazable

Posted By:   Almagest_FUTT  
Posted On:   Tuesday, October 11, 2005 12:52 PM

You serialize Objects, not "variables".

Re: Can Static Variables be Serliazable

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, October 8, 2005 12:41 PM

I don't think there's any difference re serialization, for static vs. non-static fields? same rules apply to both?


About | Sitemap | Contact