posted 16 years ago
When you implement Serializable in a subclass whose superclass is not implementing Serializable, whenever you deserialized the subclass object only superclass constructor runs. So after line 1 you get "pc"(constructor runs) & after line 2 you get "p". So your output is "pcp". This example is from K & B book, chaper:6. They have given good description.