posted 22 years ago
HI Leena,
The Singleton's purpose is to control object creation, limiting the number to one but allowing the flexibility to create more objects if the situation changes. Since there is only one Singleton instance, any instance fields of a Singleton will occur only once per class, just like static fields.
Singletons often control access to resources such as
1.Database connections or
2.sockets
Thanks
viswa
Viswanatha GB
1.
[ May 23, 2002: Message edited by: viswagb ]
==============(**)=================<br />Viswanatha.G.B<br />Sr.Software Engineer<br />IBM<br />==============(**)=================