Spec-Zone .ru
спецификации, руководства, описания, API
|
Under certain circumstances, when Java objects use serialization to store objects, the version of the class reading the data could be different from the version of class that wrote that data.
This example demonstrates some of the compatible changes that Serialization handles without using class-specific methods.
As with all examples that deal with evolution, the evolved class (AClass) must define a serialVersionUID field that is obtained using the command serialver on the original class (AClass).
Java Technology |
Copyright © 1993, 2010, Oracle and/or its affiliates. All rights reserved. |