I have two java classes which implement Serializable. I set both of them to have a serialVersionUid of 1L.
A coworker said that all classes must have a unique serial version uid and that the jvm will treat classes as equal if they have the same serial version uid. I thought equality was based on the result of the equals method and not the serial version uid.
It was my understanding that the serial version uid was used to indicate the version of the class and that when the class changed in an incompatible fashion that the serial verison uid should be incremented.
Is that correct? Is it okay to use a serialversion uid of 1? Or should java classes never have a serialversion uid of 1L?