Home > DeveloperSection > Interviews > What is Singleton class?

Posted on    May-07-2011 12:41 AM

 Java Java 
 1 Answer(s)
  973  View(s)
Rate this:

Amit Singh

Total Post:565

Posted on    May-07-2011 12:00 AM

Singleton class is a class whose only one object can be created at a time. - To achieve this one method is that we make its constructor private and provide a static method that returns its instance.

When a Singleton class is garbage - collected and then reloaded, a new Singleton instance is created.

Don't want to miss updates? Please click the below button!

Follow MindStick