class
Singleton
{
public Singleton Instance()
{
if(_instace==null)
{
synchronized
(Class.forName("Singleton"))
{
if (_instance == null)
{
_instance = new Singleton();
}
}
}
return _instance;
}
protected Singleton() {}
private
static Singleton _instance = null;
}
|