• Post Reply Bookmark Topic Watch Topic
  • New Topic

De-Serialization is returning Null values  RSS feed

 
Peyyety Avinash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simple Dog class



A Collar class:


The class where I created the objects, Serialized and De-Serialized


Output:


Please Help.
 
shivendra tripathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Modify it to



Make changes to other places accordingly.
 
Peyyety Avinash
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now the output is
!!

Collar color should be showing Red. What does (Collar@14318bb) mean?

Thanks !
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means you haven't overridden toString().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!