File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Singleton Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Singleton Pattern" Watch "Singleton Pattern" New topic

Singleton Pattern

bhuvi mdu

Joined: May 03, 2005
Posts: 17

What is a Singleton Pattern and where it is used and why it is used and can a static variable declared inside the Singleton Class and if it is watz the purpose of giving static variable inside the Singleton Class.

Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Singleton pattern is used when you need only one instance of a class to serve the requests ( like printer ). Check this article . It's being discussed many times here.
[ May 03, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
Have a look here

Cheers!<br /><b>Annie</b>
I agree. Here's the link:
subject: Singleton Pattern
It's not a secret anymore!