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 |
Give me example of chain of responsibility design pattern?
What is the difference between 3 tier and n tier architecture?
Can we inherit singleton class?
Where should we use singleton design pattern?
What are creational design patterns?
How do you ensure quality of code ?
Are you using singleton in your code?
What is software 'quality'?
Is singleton scope thread safe?
What are the additional productivity features and enhancements included with Quartus II software version 6.0?
Suppose we have file(ps), dont know how many records are there. Move half of the records to 2 files. How can we do?
What WYSIWYG web design tools are available?