Generate SerialVersionUID in Java

SerialVersionUID ensures that we are de-serializing the same class which we serialized already. As serialization will allow only the below changes to the Serialized class before de-serializing.

  • Add new variables to the class.
  • Changing a transient variable to a non-transient variable
  • Changing the static variable to a non-static variable.

[Read more…]