Can I use an arbitrary long value for serialVersionUID when I declare it in my class?

Tim Rohaly

If you don't have any previously serialized objects of that class around, you can initialize serialVersionUID to any long value you want. However, if you do have older versions of your class and wish to maintain backward compatibility, you must use the value of serialVersionUID that is determined for you by the serialver command. See http://www.jguru.com/jguru/faq/view.jsp?EID=5063 for more information on serialver.