views:

763

answers:

6

What is meant by "object serialization"? Can you please explain it with some examples?

+1  A: 

I think this provides a good definition for serialization:

http://en.wikipedia.org/wiki/Serialization

and it provides a java sample

ferrari fan
+1  A: 

Serialization is taking a "live" object in memory and converting it to a format that can be stored somewhere (eg. in memory, on disk) and later "deserialized" back into a live object.

HTH, Kent

Kent Boogaart
+1  A: 

Serialization is the process of converting an object's state to bits so that it can be stored on a hard drive. When you deserialize the same object, it will retain its state later. It lets you recreate objects without having to save the objects' properties by hand.

http://en.wikipedia.org/wiki/Serialization

Mongo
"...so that it can be stored on a hard drive." Or transferred via a binary protocol.
Jim Anderson
+7  A: 

Serialization is the conversion of an object to a series of bytes, so that the object can be easily saved to persistent storage or streamed across a communication link. The byte stream can then be deserialised - converted into a replica of the original object.

Dan
A: 

Serialization is the process of turning a Java object into byte array and then back into object again with its preserved state. Useful for various things like sending objects over network or caching things to disk.

Read more from this short article which explains programming part of the process quite well and then move over to to Serializable javadoc. You may also be interested in reading this related question.

Esko
+5  A: 
OscarRyz