Originally posted by Thirugnanam Saravanan:
After deserialization if i want to retain the value of Static Fields, what should we do?
You should search for a tutorial on handling serialization requests manually.
In short, you must implement the methods, writeObject and readObject. After writing the objects to the stream, you can simply write your static fields to the stream. While reading, read the object first and then the static variables and initialize them as such, assuming that your static variables can be initialized at runtime. For reference,
code snippet.