Wednesday, May 14, 2008

Usage of the keyword transient

transient’ means the member variable can’t be serialized with the object. Reason being, the value of such a variable is dependent upon other external factors and not on the object instance. So, there is no point storing the value as part of the object state during serialization.

While de-serialization, such a variable will be assigned to its default value depending upon its data type.


No comments: