wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Singleton Class Example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Singleton Class Example" Watch "Singleton Class Example" New topic
Author

Singleton Class Example

Kamal Ahmed
Ranch Hand

Joined: Feb 15, 2005
Posts: 91
Hi,
Can someone post a simple example of a Singleton Class (With Comments please)
woudl be GREAT, if the example is of a File Server ( a Class which Servers File to a Client Socket Application , if not, it's ok too)

Thanks in advance.

-Kamal.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
http://www.mindspring.com/~gholling2/Singleton.pdf


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Singleton Class Example
 
Similar Threads
Singleton classes
Static reference for object
Constructors
singleton class
Spring Controllers singleton or not?