What is difference between compatible and incompatible changes in serialization?
Answer Posted / javamasque
Compatible changes
Some modifications that happed in serializable class after serialization (written to flat file / DB) but there is no exception during de-serialization is called compatible change. These are as below
1. Addition of new field.
2. Static field became non-static.
3. Transient field became non-transient
4. New super class added in class hierarchy.
Incompatible changes
Some modifications that happed in serializable class after serialization (written to flat file / DB) and there is an exception during de-serialization due to the changes is called incompatible change. These are as below
1. Delete existing field.
2. Non-static field became static.
3. Non-transient field became transient
4. Any super class removed in class hierarchy.
5. Field data type changed.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is singleton class example?
What is flush buffer?
What is isa relationship?
In case of inheritance what is the execution order of constructor and destructor?
Can list be final in java?
If A Class Is Declared Without Any Access Modifiers, Where May The Class Be Accessed?
What is final access modifier in java?
How to sort array of 0 and 1 in java?
Explain purpose of sleep() method in java?
Why java is a platform independent? Explain
What is ‘is-a ‘ relationship in java?
What is a local, member and a class variable?
Which of the following is not an isolation level in the JDBC
How to add menushortcut to menu item?
What is finally and finalize in java?