serialVersionUID can be long, which provides a unique signature for your object for serialization and deserialization. I donβt think it should even be unique. This means that the serializer knows that it is the same Foo.class, even after you change the structure of the class. Usually I use -1L for value.
source share