my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Object Serialization Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Object Serialization Doubt" Watch "Object Serialization Doubt" New topic
Author

Object Serialization Doubt

Rio Reva
Greenhorn

Joined: Nov 19, 2006
Posts: 14


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

Joined: Aug 31, 2004
Posts: 11343

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?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Rio Reva
Greenhorn

Joined: Nov 19, 2006
Posts: 14
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

Joined: Aug 31, 2004
Posts: 11343

 
 
subject: Object Serialization Doubt
 
Similar Threads
serialization
what is the output
Chapter 6 K&B Self Test Question 12 Help
Object type casting
Constructors called when deserializing properly serialized subclass instance