Unlike other common O-O languages, Java provides an inbuilt solution: serialisation
. Objects of any class that implements the Serializable interface may be transferred
to and from disc files as whole objects, with no need for decomposition of
those objects. The Serializable interface is, in fact, nothing more than a marker to
tell Java that objects of this class may be transferred on an object stream to and from
files. Implementation of the Serializable interface need involve no implementation
of methods. The programmer merely has to ensure that the class to be used includes
the declaration ‘ implements Serializable ’ in its header line.