Java / Design Patterns
Why do we need Singleton class? (or) what are the advantages of using singleton pattern?
- Singleton class prevent creation of many objects to the class.
- Object creation of that class could be time-consuming.
- Objects that are used across the application be singleton as it is very convenient to maintain the state.
More Related questions...