Hi,

Serialization puts an entire object in the file, so you will have
"unreadable" and "readable" text inside. Anyway, an object serialized is not
intended to be read with an text editor. That' s why
DeserializeMyClassToBePersisted works.

Because yearStarted is transient it will be 0 when you deserialize.
Is not null because is not an object and integer is default 0 when you
declare it (also all primitive numerics).



>
> When I run the SerializeMyClassToBePersisted.java I get file with
> unreadable and readable text.
> When I run the DeserializeMyClassToBePersisted.java It reads it
> correctly. My problem is the yearStarted is transient and should be
> null after it gets deserialized right? I'm not getting that.
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to