File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Serialization -- reference variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Serialization -- reference variables" Watch "Serialization -- reference variables" New topic

Serialization -- reference variables

karimkhan pathan
Ranch Hand

Joined: Jul 14, 2008
Posts: 86
hi all ,

When a object is serialized the refernce variables which refer the object will serialize or not ?

Bupjae Lee
Ranch Hand

Joined: May 14, 2007
Posts: 107
All non-transient non-static field will be serialized, both primitive type and reference type.

If non-transient non-static reference type field is referring non-serializable object, exception occurs.
I agree. Here's the link:
subject: Serialization -- reference variables
It's not a secret anymore!