Changes

Jump to: navigation, search

Prototype

56 bytes added, 18:15, 18 March 2007
Sample code
Subclasses must implement the Clonable interface and then override the clone() method and call the super classes clone method in the implementation of overridden clone method using super.clone() statement.If you don't implement Cloneable, the super.clone() implementation will throw a CloneNotSupportedException.
The following is the implementation of Cookie class in apache tomcat server. This class makes use of prototype pattern and Clonable interface to create clones of cookie object.[http://en.wikipedia.org/wiki/Apache_HTTP_Server Apache]
1
edit

Navigation menu