Does the value for serialVersionUID matter?

I use serialized classes in java, and in these classes I need to specify serialVersionUID with some long number that needs to be initialized. Default required

    private static final long serialVersionUID = 1L;

Or else I can initialize the same with another long number, for example, as below:

    private static final long serialVersionUID = 5561040348988016571L;

some very large number.

My question is: does it really matter what value we initialize for serialVersionUID or not?

+3
source share
2 answers

My question is whether this is the value that we initialize for serialVersionUID, or it does not matter.

, , (, ), , . , serialver .class , , .

+1

, , serialVersionUID ( UID eclipse).

-1

All Articles