简体   繁体   中英

How JVM find serialVersionUID of the class of the object at the time of deserialization

Suppose I have an entity class which implements the Serializable interface and now I persisting that serialized object in the database. How JVM find serialVersionUID of the class of the object at the time of deserialization.

When object serialized it's class name and serialVersionUID stored in stream.

When object deserialized JVM load class by name and compare serialVersionUID of loaded class with stored value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM