This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Serialization means that you save the object to the hard disk or something like this. Only thing you need is that your class need to implement the Serialization interface. Transient fields are not serialized. Look at Sun tutorial, you will found there an example.
Serialization means writing a state of an object to a stream i.e. either to a file or to any other stream. Serialization is used in some advanced topics like RMI and EJB. To serialize an object, one has to implement Serializable or Externalizable. Serializable is a marker interface. While writing an object state, the compiler will check whether the object's class is of type serializable or not. If not, it'll throw an exception.
Thanks & Regards,
Work Hard, Expect The Worst...<br /> <br />Bimal R. Patel<br />(SCJP 1.2, SCWCD 1.4)