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
Why should we not use singleton pattern?
Why have we declared the instance reference volatile?
What are the most important software design patterns?
Write the code for a singleton class?
Why singleton beans are not thread safe?
What are the design patterns you know explain?
Give me example of chain of responsibility design pattern?
when performing a functional test on a phone calculator,if pressing on a button does not function what do i do next
Are singletons bad?
What is the difference between adapter and facade?
Contact a system development program in your organization. Research how they analyzed their SYSTEM OF INTEREST (SOI), its OPERATING ENVIRONMENT, and their respective system elements. How was this analysis reflected in the SOI architecture?
Which design pattern is mostly used in net?
What is singleton design pattern in java?
Suppose we have file(ps), dont know how many records are there. Move half of the records to 2 files. How can we do?
What are useful tools for developing and testing color schemes for web sites?