Thread: serialVersionUID

Forum : Web Service Api?s.   23-1-2016 12:00:00 AM
User Image
TARUN1333

Newbie

Joined: Apr 20, 2017

Points: 100

Threads: 3

Posts: 9

serialVersionUID

| Quote Date : Jan 23, 2016    Views:563    

What is the use of serialVersionUID. Why eclipse insist to write serialVersionUID when creating our own Exception and writing Servlets. Please explain with some example what may be the problems if we don't write that serailversion. Thank You

tags: java

Comments

User Image
sri2054

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 0

Posts: 5

Re: serialVersionUID

Reply Date : Jan 23, 2016

I think serialVersionUID is used to keep track the version when we serialized the objects into bits and bytes we can provide the serialversionUID by the programmer or if programmer doesn't provide any versionUID then jvm only generates a 16bit UID when we deserialized again into objects it jvm will checks with versionUID

User Image
sri2054

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 0

Posts: 5

Re: serialVersionUID

Reply Date : Jan 23, 2016

I think serialVersionUID is used to keep track the version when we serialized the objects into bits and bytes we can provide the serialversionUID by the programmer or if programmer doesn't provide any versionUID then jvm only generates a 16bit UID when we deserialized again into objects it jvm will checks with versionUID

User Image
Basanta2041

Newbie

Joined : Apr 20, 2017

Points : 100

Threads: 27

Posts: 139

Re: serialVersionUID

Reply Date : Jan 24, 2016

Bro if u not use serialVersionUID then when ur class compile it will generate one serialVersionUID. ... Suppose u keep on changing ur code due to some logical mistake then think How many id will be assigned which is complicated and performance issues. Due to this in case of serialization also we wil face problem. .

Load More

No More Comments