> > If you have, say, readObject in the base class, does this method invoked
> > when you are processing derived types?
>
> No. But you can get that behavior by implementing Externalizable
> instead of Serializable. So it can work both ways.
Actually, let me clarify (I somehow misunderstood the question in my
haste). Yes. :-) readObject() is invoked for every class that
declares it in a hierarchy.
However, derived classes are not supposed to call a super.readObject()
to coordinate serialization (normally they can't anyway, because
readObject() is supposed to be private). Explicit coordination
between classes in a hierarchy is possible with Externalizable.