static final long serialVersionUID = -4544769666886838818L;
What does this mean to Gosling's tool..?
It's used when deSerializing an object, to determine whether that object is compatible with that object's class file in the JVM doing the deserialization. If the serialVersionUID of the class file doesn't match the serialVersionUID of the deserialized object, you'll get an InvalidClassException. If the class file doesn't explicitly declare a serialVersionUID, then the serialization runtime has to compute it, which is a relatively expensive process.
So what makes the Object that was serialized and its class incompatible?
1. Deleting fields from the class
2. Changing the type of a field
3. Changing a class from Serializable to Externalizable or vice versa
Keep the Pandoras box closed by adding a serialVersionUID to the class file.