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 |
i have file(ps),dont know how many records are there. move half of the records to 2 files. how can we do
What are the SDLC phases you have invloved ?
0 Answers Infosys, Tech Mahindra,
What are the design patterns and How can they make life easier for software development ?
What is aop design?
What three types of components comprise an application design?
Shall we use abstract classes or interfaces in policy / strategy design pattern?
What are sequence diagrams, collaboration diagrams and difference between them ?
8 Answers ACET, CT, CTS, Infosys,
What is the executor design pattern?
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 are useful tools for developing and testing color schemes for web sites?
Hi, I have 9backlogs in btech and i am 2008 passed out,am working with an MNC from past 3 years.now, am willing to do MS, will it be any problem for me?
Can we use an equated value as operands for an MVC ? Reason for the same.