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 most popular design patterns?
What is difference between function oriented design and object oriented design?
What are the most commonly used design patterns?
Explain what is good design?
when performing a functional test on a phone calculator,if pressing on a button does not function what do i do next
What are the most important software design patterns?
Why do we need singleton pattern?
What are the main usage of the patterns?
Quartus II software version 6.0 is available for which operating systems (OS)?
Shall we use abstract classes or interfaces in policy / strategy design pattern?
Why singleton beans are not thread safe?
What is factory method in design pattern?
Write the code for a singleton class?
Using any system, product, or service your organization provides, identify the human system roles for the product.
Is singleton an anti pattern?