Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!