Scenario 2:
When you deserialize the Dog the Dog constructor will not run but the Animal constructor will and so gets default values.
In this case there is NO relationship that is "IS-A"(extends). So there is no point of construtor calling.
the null value is because of the trasisent keyword
Scenario 4
but the name of the dog is still Pete.
Dog class is serializable...So pete(name) is restored.
But what about the call to super()?
super call will ONLY be executed if th DOG construtor is executed.
Correct me if i dont make sense.