This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serialization : Help Needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Serialization : Help Needed" Watch "Serialization : Help Needed" New topic
Author

Serialization : Help Needed

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
using writeobject and readobject :

if we define these methods then also we won't be able to serialize the HAS-A relationship object. In other words, the Collar Object. Right ?
prashanth kumar
Ranch Hand

Joined: Mar 22, 2004
Posts: 162
Assuming your Collar doesnt implements serializable,you are right.
You are recreating the Collar object in readObject() and passing it on.

Rgds
Prashanth


SCJP1.5(86%)<br />SCWCD1.4(95%)<br />SCBCD1.3(92%)<br />IBM 252
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Serialization : Help Needed