What does it mean: The serializable class does not declare a static final serialVersionUID field? [duplicate]

From the javadoc: The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect to serialization. If the receiver has loaded a class for the … Read more

What is a serialVersionUID and why should I use it?

The docs for java.io.Serializable are probably about as good an explanation as you’ll get: The serialization runtime associates with each serializable class a version number, called a serialVersionUID, which is used during deserialization to verify that the sender and receiver of a serialized object have loaded classes for that object that are compatible with respect … Read more