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
serialVersionUID
explicitly by declaring a field named "serialVersionUID" that must be static, final, and of type long.
So it must be static.

Federico klez Culloca
- 26,308
- 17
- 56
- 95