wood burning stoves 2.0*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
It is sorta covered in the JavaRanch Style Guide.
subject: Serialization -- reference variables
Similar Threads
What is thread-local variable
No. of Objects & Reference Variables
Regarding vector
whats the difference between Objects and reference variables?