Mega Code Archive

 
Categories / Java Tutorial / File
 

Conditions for Serialization

If a superclass of your class is not serializable, it still may be possible to make your class serializable. Each superclass that is not serializable must have a public default constructor - a constructor with no parameters. Your class must implement the Serializable interface. Your class must serialize and deserialize the not-serializable fields in the superclasses. Transient data type is not serializable.