Quick answer: any class you want to keep for later use.
This includes things like data wrappers (Integer, String, Character, etc.), data classes, and collections.
However, collections can be serialized if the elements in them are serializable.
In addition, there is a second Externalizable interface that is used by classes that write their data to some external interface, only with reference to the specified element stored in the serialization stream.
source share