How can we design/implement singleton object?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / jayashri
by declaring the constructor as private and we have to create public static method which returns the address of single object.
| Is This Answer Correct ? | 0 Yes | 0 No |
. Run us through your design process.
Where should we use singleton design pattern?
What is the use of such a class?
What are the 23 design patterns?
What is the design pattern?
What is the singleton design pattern?
what is cascading order?
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 difference between adapter and facade?
Suppose we have file(ps), dont know how many records are there. Move half of the records to 2 files. How can we do?
Give the syntax of css?
What is ESD?