Am trying to add my class in cache. If i do that it throws error like
Caused By: java.io.NotSerializableException: com.test.package.PropertyGroup
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
So i came to know that my object should implement Serializable
interface for my class. And i have implemented Serializable interface. But it shows warning that my class should have serial version ID with two options default serial version ID
and generated serial version ID
. What is the difference between these two i.e serialVersionUID =1L
and some random generated value serialVersionUID = 8243252575074067947L;