This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Originally posted by Consta Chertakovsky: How to prevent singleton object from the object cloning. ... implement clone method with throws new UnclonableObjectexception. If any other way we have to do it?
the easiest and the normal way is to leave off "implements Cloneable". Then any caller gets a similar exception as the one supposed by you.
Making any constructor private could not keep the singleton from being cloned because clone(), if Cloneable, bypasses any constructor. This bypassing any constructor is the reason for better performance.