Thursday, February 22, 2007

serialization,transient variable,serialVersionUID

what is serialization,transient variable,serialVersionUID in java?

Java allows creation of Objects. It exists as long as JVM keeps running.It would be nice if the objects we create could exist beyond the lifetime of the virtual machine, wouldn't it?Well, with object serialization, you can flatten your objects and reuse them in powerful ways.

Object serialization is the process of saving an object's state to a sequence of bytes, as well as the process of rebuilding those bytes into a live object at some future time.

Rules of Serialization:
1: The object to be persisted must implement the Serializable interface or inherit that implementation from its object hierarchy
2: The object to be persisted must mark all nonserializable fields transient.


For more information Click here

No comments: