Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

serialization question  RSS feed

 
William Yan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
I saw this in a K&B exam.

The output is 'pcp'.
I don't know why the 2nd 'p' is printed.
Thankyou.
 
Bing Qiao
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The base class doesn't implement Serializable Interface which means the constructor of the base class will be called during the deserialization of the subclass.
 
William Yan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
^O^
Got it.
Thanks a lot.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!