Java Externalizable serialVersionUID
-
28-10-2019 - |
Question
If I implement Externalizable, will I need to specify serialVersionUID in that class for version compatibility?
In other words, does Java check serialVersionUID while deserializing Externalizable objects?
Solution
Even through a class is Externalizable, one still has to add a serialVersionUID member to the class to indicate even though the interface to the class has changed, it is still compatible as far as the serialized or externalized form of the class.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow