When doing Java's Singleton, don't forget to handle Clone methods!
Example (taken from a unknown English document)
Public Class SingletonObject
{
Private singletonobject ()
{
// no code req'd
}
Public static singletonobject () {if (ref == null) // it's ok, we can call this constructor ref = new singleletonobject (); returnif;}
Public Object Clone () throws clonenotsupportedException {throw new clonenotsupportedException (); // That'll Teach 'em} private static singletonobject ref;
}