Before you can use writeObject
and readObject
with the
instances of a particular class, you must indicate to the Java compiler
that you intend to use instances of that class in serialized inputoutput operations. You use the
Serializable
interface to indicate your intention.