I am implementing more classes which extend the Serializable interface.
I understood it is good to mention a value for serialVersionUID.
private static final long serialVersionUID = 1024L;
So, given that i will use all those classes, should i give the same value for serialVersionUID for each class, or on the contrary, they have to be different?
Thank you.
They do not have to be different and also do not have to be the same. It is only used to ensure that some serialized object can be deserialized by that class. Basically, if you changed the code of a serialized class you should also change this value.