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 |
Where should we use singleton design pattern?
When singleton pattern is used?
Is singleton bean thread safe?
What are the SDLC phases you have invloved ?
0 Answers Infosys, Tech Mahindra,
Why is singleton used?
What skills do you think are necessary for a UI UX Designer?
What is single tone design pattern in java?
Is oop a design pattern?
What is singleton design pattern in java?
What is the singleton design pattern?
What is grouping in CSS?
What is the methodology to follow in collaboration with other team members like researchers, product managers, and developers?