jQuery in Action, 3rd edition
The moose likes OO, Patterns, UML and Refactoring and the fly likes singleton class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "singleton class" Watch "singleton class" New topic

singleton class

tushar limaye

Joined: Jan 14, 2001
Posts: 4
how to write a singleton class?
Carl Trusiak

Joined: Jun 13, 2000
Posts: 3340
OO Patterns, UML and Refactoring would be the appropriate forum for this, I'm moving it there.

I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Joe Paolangeli
Ranch Hand

Joined: Apr 05, 2000
Posts: 73
Try out this article: http://members.tripod.com/rwald/java/articles/Singleton_in_Java.html

You may also want to check out Bruce Eckel's
online book "Thinking in Patterns with Java": http://www.bruceeckel.com/TIPatterns/index.html

[This message has been edited by Joe Paolangeli (edited January 14, 2001).]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
It's always worth doing a search here at JavaRanch. I found an old post here whch might be helpful.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Peter Tran

Joined: Jan 02, 2001
Posts: 783
If you're using JDK1.3, check out the enhancement section on the Collections Framework. The JDK1.3 has added java.util.Collections.singletonList and java.util.Collections.singletonMap. Most definitely .
I agree. Here's the link: http://aspose.com/file-tools
subject: singleton class
It's not a secret anymore!