Answer Posted / ravi
Make the constructor private
provide a static synchronized method to get the Instance.
this should make the object singleton for that jvm instance
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the benefits of the proxy in the design pattern?
Which design patterns have you used in your project ?
Hi, I have 9backlogs in btech and i am 2008 passed out,am working with an MNC from past 3 years.now, am willing to do MS, will it be any problem for me?
What is the gang of four design pattern?
What is the builder pattern?
Why should we not use singleton pattern?
What is the factory pattern in the design pattern?
What is use case in clean architecture?
Did you use ooa/ood methodologies? Did you use design patterns?
Is mvc is a design pattern?
What is the difference between architecture and design?
Is singleton a design pattern?
What are the most important software design patterns?
What are the differences between the design patterns and the framework?
What is the concurrency design pattern?