1.

What Are The Different Conditions That Has To Be Kept In Mind When Using Serialization Concept?

Answer»

The conditions that has to be kept in mind while using serialization is that: 

The class should be declared as public and it should implement the serializable VERSION identifier that is given as serialVersionUID to read the serial versions that are being loaded or updated. 

The class should not consists of any ARGUMENT constructor and all the FIELDS of the class should have a serializable field in it. This can be either primitive types or Serializable objects type. 

The class doesn't itself declare any methods and an execption can be made in the fields that are made transient and these are ignored during serialization.

The conditions that has to be kept in mind while using serialization is that: 

The class should be declared as public and it should implement the serializable version identifier that is given as serialVersionUID to read the serial versions that are being loaded or updated. 

The class should not consists of any argument constructor and all the fields of the class should have a serializable field in it. This can be either primitive types or Serializable objects type. 

The class doesn't itself declare any methods and an execption can be made in the fields that are made transient and these are ignored during serialization.



Discussion

No Comment Found