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 |
Which design patterns have you used in your project ?
What is synchronizer token pattern?
Why should we not use singleton pattern?
Give me example of chain of responsibility design pattern?
What are sequence diagrams, collaboration diagrams and difference between them ?
8 Answers ACET, CT, CTS, Infosys,
Where do you find inspiration and what are your long-term goals?
Shall we use abstract classes or interfaces in policy / strategy design pattern?
Which Design Patterns you know?
What are the Design Patterns you know
What is a lazy initialization in singleton?
What are the types of participants of the prototype design pattern you will get?
5.Develop an entity relationships diagram that identifies physical entity relationships.