the default mechanism for restoring the object’s non-static and

  • non-transient fields

    If a serializable class does not explicitly declare a serialVersionUID, then

  • the serialization runtime will calculate a default serialVersionUID value
  • for that class based on various aspects of the class, as described in the
  • Java(TM) Object Serialization Specification.

    However, it is strongly

  • recommended that all serializable classes explicitly declare
  • serialVersionUID values, since the default serialVersionUID computation is
  • highly sensitive to class details that may vary depending on compiler
  • implementations, and can thus result in unexpected