Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

singleton class

 
tushar limaye
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to write a singleton class?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OO Patterns, UML and Refactoring would be the appropriate forum for this, I'm moving it there.
 
Joe Paolangeli
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's always worth doing a search here at JavaRanch. I found an old post here whch might be helpful.
 
Peter Tran
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
-Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic