• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about serialization (Ch 8) in the Boyarsky/Selikoff OCP study guide  RSS feed

 
Elana Abelev
Ranch Hand
Posts: 30
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone!

On p.432 (Ch 8), the example on serialization says that the type of both animals after deserialization would be 'P' (even though one is initialized with type='P' and the other with type ='T' on page 428).  I tried it and indeed in my examples one is P and the other is T.   Please, explain why they're both type P in the book.

Thank you!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elena,
I get "P" for both. Did you forget to change type to be static when testing it by any chance?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!