Ask your own question, for FREE!
Computer Science 22 Online
OpenStudy (anonymous):

I am working on a snake game and i was wondering what this does in java private static final long serialVersionUID = -1102632585936750607L;

OpenStudy (anonymous):

Hmmm... let me see

OpenStudy (konradzuse):

It has to do with giving your program some sort of ID... I read briefly about it... Not sure it's needed at all...

OpenStudy (anonymous):

The serial version UID is used during serialization (e.g. ObjectInputStream, etc.) to provide "versioning" for types of objects. Attempting to read a serialized object whose UID does not match the version of it's associated class will fail; it's a means of providing a way to "version" serialized objects.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!