hey
i have that singleton code in java but how can i check that it have an instance only?
class singleton
{
private static singleton instance;
private singleton()
{
}
public static singleton getInstance()
{
if (instance == null){
instance = new singleton();
}
return instance;
}
}
thanks in advance!