posted 22 years ago
Agree wid Angela n Tauqueer
Correct options r 2) & 3)
static members ( or class members ) do not belong to object
so they are not serialized
while de-serializing the object ,when da class is loaded for first time , static fields get there default value , or value assigned in static initializers
There is one more point to remember , instace variables will get there values back while de-serializing , but to make the instace of such a object , de-serializing process first calls its no-parameter constructor ( also knwon as default constructor )
steps r :
- call no-parameter constructor to allocate memory for an object
- read n fill in da values of instance variables of this object
this process can be recursive , as serialization can also be , if the object references contained by object's member variable are also serializable
So apart from implementing serializable interface , Class must also hav a no-parameter constructor , to lend itself for serialization process.
------------------
Gagan (/^_^\)
Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="http://www.objectfirst.com/blog" target="_blank" rel="nofollow">My Blog</a>