@Rishi Srivastava
--------------------------------------------------------------------------------
Chapter 04 - Serialization versioning
--------------------------------------------------------------------------------
Suppose we have a class, and we have serialized its object to a file on the disk, and due to some new requirements, we added/removed one field from our class. Or just added a new utility method to it. Now, if we try to deserialize the already serialized object, we will get InvalidClassException.
When we serialize a class, each class has a unique identification number associated with it. Its also called stream unique identifiers, more commonly known as serial versionUIDs.
If we do not specify this number by declaring a static final long field named serialVersionUID, the system automatically generates it at runtime by applying a cryptographic hash function (SHA-1) to the structure of the class.
This value is affected by the names of the class, the interfac
0 views
1003
269
1 day ago 00:22:08 0
Trump stratège, Macron figurant : le vrai plan se dévoile !!
1 day ago 00:19:12 4
Dokumentarni film “Lepa toplička sela zaboravljena gore“ I Južne vesti
1 day ago 01:20:24 0
Как избавиться от страданий/ Артур Пранава/ Путь Сердца #87