What is a serialVersionUID and why should I use it?
@lebyy▲ 0 net votes
Problem: Eclipse issues warnings when a serialVersionUID is missing. The serializable class Foo does not declare a static final serialVersionUID field of type long What is serialVersionUID and why is it important? Please show an example where missing serialVersionUID… Fix (from the top answer): 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…