Declaring an explicit serialVersionUID is mostly recommended for serialization but not for array classes as per the last line of javadoc for serialization
Array classes cannot declare an explicit serialVersionUID, so they
always have the default computed value, but the requirement for
matching serialVersionUID values is waived for array classes.
Which array classes javadoc is referring to ?
I am aware of only Arrrays which is a utility class and Array which is final.
So are there any more classes its concerned about ?
Why array classes can't declare an explicit serialVersionUID ?
There is another post but it doesnt explain the reason of not allowing array classes to declare serialVersionUID
No comments:
Post a Comment