public class Factoryclass
{
public static MyClass returnObject(String str)
{
// Based on the parameter passed it will retrn some class
}
}
If in a Web Application , theer were 100 requests .
Now please tell me how many objects of Factoryclass will be created ??
if you do
no
Factoryclassinstances will be created, unless you donew Factoryclass()inside thereturnObjectmethod