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 |
Can we inherit singleton class?
If a client does not like a design what will your approach be?
what is diffrence between Function Oriented Design and Obeject Oriented design
11 Answers IBS, TCS,
What do you do to ensure that your design is carried out perfectly from your end?
Explain what are 5 common problems in the software development process?
Is mvc is a design pattern?
Why have we used synchronized here?
What is your research methodology?
How can we design/implement singleton object?
What are useful tools for developing and testing color schemes for web sites?
What is difference between GoF and J2EE patterns?
What are the design patterns and How can they make life easier for software development ?