In my Eclipse I was trying example on serialization and I came across following warning
I know what serialVersionUID is and what is it's significance in Serialization. I have following questions about this warning
How does IDE assign default value. Is it hard coded in the IDE?
yes default is hard coded value, which is 1L
When it says generate id what parameters are used to generate new id?
generally method fields and method signatures should used to determine it, since you are asking specifically about eclipse, not sure about it, there is a serialver
utillity which simply gives you serialVersionUID for your class
$serialver A
serialver A: static final long serialVersionUID = -609421954100196333L;
Not sure what the 3rd option is. Says something about suppress annotation. Does that mean no id is assigned at all. In that case what is used in serialization?
it says, instruct java compiler to not complain about this particular warning for this case by adding @SuppressWarning
annotation
Also See