That's correct, comrade!
I do not know if some other more advanced topics related to serialization are part of the SCJP now.
One of this topics is the custom formatting of serialization process. If you implement two methods in the Serializable object you can override the default serialization process to accomodate specific requirements.
Those methods are private void writeObject(ObjectOutputStream) and private void readObject(ObjectInputStream).
Hence, you could actually save the state of the static member of the class Gun, that I wrote previously using this code.
If you test this new implmentation you will find that the serialization process of the current object state is overriden by the code programmed in the new private methods.
By means of this methods (which should be private) you can control the way an object serializes its state. For example, saving the state of the static members or data related to static or transient members.
For instance, database connection object should be transient, because it is not serializable. But you could serialize the connection
string, so that when you deserialize the object you can restablish the connection with the database.
I guess, there a couple of other nices features related to serialization that may not be in exam.
But I hope you may find this interesting.
[ April 09, 2006: Message edited by: Edwin Dalorzo ]
[ April 09, 2006: Message edited by: Edwin Dalorzo ]