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 |
What is the difference between factory and strategy design pattern?
Why do we need singleton pattern?
How can we design/implement singleton object?
What is the use of repository pattern?
What are the categories in which the design patterns can be divided?
Tell us about some of the projects that have been your favorite.
Write the code for a singleton class?
. Explain your area of focus.
what are design patterns..?what design patterns used in .net.
Is dependency injection a design pattern?
What is meant by design pattern?
What is the difference between adapter and facade?