The Serializable Interface
Serializable is another marker interface. An object’s class must implement Serializable if it is to be passed to writeObject(). If it doesn’t, a NotSerializableException will be thrown.
Implementing Serializable doesn’t appear to affect the way the Java compiler and JVM treat the class in general—it seems to be simply a safety feature in ObjectOutputStream.