When you want to read class hash code, use tool serialver.exe. It is in your \java\jdk\bin directory.
I recommend you set this directory into your system path variable.
Suppose this class (Person.class file):
import java.io.Serializable;
public class Person implements Serializable {
          
  public Person() {}
      
  String name;
  int age;      
}
, then I can read class serialVersionUID:When you make small change:
import java.io.Serializable;
public class Person implements Serializable {
public Person() {}
String name;
int age1;
}
, returned value is other:

No comments:
Post a Comment