class Single
{
private static final Single s=new Single();
private Single(){}
public static Single getInstance()
{
return s;
}
}
class Single
{
private static Single s=null;
private Single (){}
public static Single getInstance(0
{
if(s==null)
s=new Single();
return s;
}
} |
|