Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object Serialization Doubt

 
Rio Reva
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If you attempt to serialize an instance of Ford, how many objects would be serialized?
Since both Car & Ford(subclass too is Serializable), is it 2?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rio Reva:
...If you attempt to serialize an instance of Ford, how many objects would be serialized?

If you have an instance of Ford, how many objects do you have?
 
Rio Reva
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marc,

Actually it was a foolish doubt,after posting only I realized it.I took it as Ford HAS-A Car.That's why.Anyways, thank you.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic