In his article, he describes the Prototype design pattern and Java-related issues like cloning. I will be presenting an implementation of the pattern that builds on his work. The Prototype Pattern Start with an interface for each object. As shown in Listing 1, the interface is used to extend the Cloneable and Serializable interfaces. The Prototype pattern requires the ability to be cloned.
Serialization is needed to implement objects in files.
Serialization In order for the symbols to be read from a file, or stream, they must support serialization. Simply stated, object serialization provides a program with the ability to read or write objects from a stream. ObjectInputStream is applied to the stream to convert it into a series of objects. Any object that needs to be serialized must implement the Serializable interface. If there are special requirements, say, the objects require special storage, an object could alternately implement the Externalizable interface.