posted 16 years ago
The most common implementations use the following ingredients:
* Private constructor - prevents any other class from making an instance
* Static getInstance() method - gives clients a way to get the one instance
* Static variable - holds the one instance
Can you picture how those would work together? See if you can code something up and share what you make. It will be a lot more memorable than just copying an answer we give you.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi