My dear friend. You just said that the variable cityName since is static belongs to the class. You set the value of this variable at the begining of your method and by the time you deserialize the object, it is still set.
The value that you see in the output is not taken from the deserialized object, but it was the one you set for the class variable at the begginning.
If you want to
test it. Set the variable before serialization, then set it to blank before deserializing and you will see.
cityName = "New York";
serialize(object);
cityName="";
deserialize(object);
And you will see cityName continues to be blank (""). In other words, serialization is not touching your variable, but you are.
[ September 14, 2007: Message edited by: Edwin Dalorzo ]