MoadBus interview question

What are the compatible changes and incompatible changes in Java Serialization Mechanism?

Interview Answer

Anonymous

May 24, 2014

The real challenge lies with change in class structure by adding any field, method or removing any field or method is that with already serialized object. As per Java Serialization specification adding any field or method comes under compatible change and changing class hierarchy or UN-implementing Serializable interfaces some under non compatible changes. For complete list of compatible and non compatible changes I would advise reading Java serialization specification.