Question { TCS, 65296 }
What is singleton class?
Answer
Singleton gives only one instance.
class Single{
static int objCreated = 0;
private Single(){
}
public static Single getThis(){
if(objCreated==0)
{
return new Single();
ob=1;
}else
{
return this;
}
}
}