Hi All,
I have seen in multiple instances wherein serialVersionUID is assigned some random Long value in custom servlet. I am not sure as to why exactly is this used. Don't see this variable getting used anywhere.
Can someone please let me know as to what purpose does it serve.
Solved! Go to Solution.
Hi,
serialVersionUID is a Java "thing" for Serializable classes: Stream Unique Identifiers.
It's used by the regular Java serialization mechanism: Serializable Objects.
Regarding the "random" long value it has probably been generated/assigned by an IDE (Eclipse, IntelliJ), based on the characteristics of the corresponding class.
Some additional references about Servlets and serialization:
Best regards,
Daniel.
Views
Replies
Total Likes
Hi.
serialVersionUID is a Java "thing" for Serializable classes: Stream Unique Identifiers.
It's used by the regular Java serialization mechanism: Serializable Objects.
Regarding the "random" long value, it has probably been generated/assigned by an IDE (Eclipse, IntelliJ), based on the characteristics of the corresponding class.
Some additional references about Servlets and serialization:
Best regards,
Daniel.
Views
Replies
Total Likes
Hi,
serialVersionUID is a Java "thing" for Serializable classes: Stream Unique Identifiers.
It's used by the regular Java serialization mechanism: Serializable Objects.
Regarding the "random" long value it has probably been generated/assigned by an IDE (Eclipse, IntelliJ), based on the characteristics of the corresponding class.
Some additional references about Servlets and serialization:
Best regards,
Daniel.
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks a lot Scott and Daniel for your replies.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies