Wednesday, October 24, 2018

java - Array classes cannot declare an explicit serialVersionUID

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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...