For what is serialization you can read the link given above. Moreover, you can google serialization.
Implementing Serializable is bit tricky not that difficult though. YOu just need to take care of few things. Mainly, over-riding of readObject() method. For more you can refer to the book Effective Java from Joshua Bloch or try this link out.
Serilization is used in many ways when we need to send the objects over the network, or persist the objects on to storage device, etc.
Originally posted by Adeel Ansari: Mainly, over-riding of readObject() method.
First of all, readObject is private so it isn't overridden. Instead, it is re-implemented.
Second, you only need readObject (and its partner in crime, writeObject) if you need to do some custom serialization, like serializing fields of a parent class that isn't serializable.
If you let a class implement java.io.Serializable, all primitive fields and serializable fields are serialized without any extra work. It's only when you need to store non-serializable fields or do any other custom work when readObject and writeObject come into play.
... you only need readObject (and its partner in crime, writeObject) if you need to do some custom serialization, ...
including supporting over versions of your object,
for example, if you were using a data object to represent your document, and you updated the structure, you might want to be able to readObject() from old versions, then when you writeObject() it would be updated
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);