This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
readObject and writeObject are used to serialize objects automatically.
If you want to manipulate the serialization process (like you would like to serialize a transient field), then you can override these methods. Then when an object of the class is serialized or deserialized, these methods are called by the JVM. If you want the automatic serialization to happen and then want to do some extra work during serialization, then you can call defaultReadObject and defaultWriteObject
eg if you want your object to be written automatically, and add a line with "bye" at the end, then you will
override writeObject call defaultWriteObject in the overriding method manually write "bye" to the output stream...