This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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
jQuery in Action, 3rd edition