i was referring to this question it mentions that
when a Serializable class implementing readObject/writeObject is subclassed, and if the subclass has its own readObject/writeObject, they don't need to call super's readObject/writeObject. Not so if the super/subclass instead implement Externalizable. In this case, super's writeExternal/readExternal need to be explicitly called. However, this difference is irrelevant from an efficiency point of view.
- is this true?
- how do i understand this ?
does this mean for every read/write Object method the compiler adds a call to defaultread/writeObject() method in first line?
how does deserialization would behave for custom read methods , how does its gonna resolve parent class objects without superclass constructor example: i only write child class object in stream , and during deseralization what values will i see for parent class objects?
- or it just behaves like writeExternal/readExternal methods ?