Java serialVersionUID must be static? Can it be an instance variable set by a sub class through constructor?
Asked
Active
Viewed 36 times
1 Answers
1
From the Serializable docs.
A serializable class can declare its own
serialVersionUIDexplicitly by declaring a field named "serialVersionUID" that must be static, final, and of type long.
So it must be static.
Federico klez Culloca
- 24,336
- 15
- 57
- 93