Whenver we have to implement the Seriazable interface we have to define a private member of "long" type for interoperateablity. This member is "serialVersionUID" . What is the criteria to set this final member , I mean what value we have to set for this ?
It needs to be a long. You can make one up. Incompatible versions of the same class should have different values. If you make a change to a class that would alter the way it would be serialized [i.e., add a field], you should change the UID.
If you need to find the uid of an existing class you can use the java utility serialver. The command is:
serialver [-classpath classpath] [-show] [classname...] [ December 27, 2006: Message edited by: Scott Johnson ]