• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization  RSS feed

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using an IDE for programming. So, when my program implements Serializable, i get the following code




What does it means?
 
Guy Mograbi
Greenhorn
Posts: 4
IntelliJ IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The serialVersionUID is a way to version your serialization.
Whenever you have a change in the class that affects the serialization, you should modify the serialVersionUID.

This way, the application knows when its trying to read an Object with wrong version (Instead of some other unclear error).
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a good description in Horstmann and Cornell Core Java II (I think vol i).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!