I have a employee class:
class Employee implements Serializable{
int empId;
String empName;
double salary;
}
One object of this employee class is serialized and stored in some file say employee.ser
I want to add one more field in the existing employee class. Now my employee class will be something like this
class Employee implements Serializable{
int empId;
String empName;
double salary;
String state="abc";
}
Is it possible to deserialize the old object, such that it will have default value for the state?
If it is possible, then how?