How can we design/implement singleton object?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you choose a design pattern?

564


Which design pattern is mostly used in net?

582


What are the most important software design patterns?

617


What are the differences between the design patterns and the framework?

602


Which design pattern is mvc?

628






What are the design patterns you know explain?

595


What is aop design?

580


What are the main usage of the patterns?

636


What is the difference between proxy and adapter?

611


What are structural design patterns?

607


Explain what is good design?

623


Can we make the reference instance non static?

549


What is the difference between 3 tier and n tier architecture?

609


What are the benefits of the proxy in the design pattern?

601


Shall we use abstract classes or interfaces in policy / strategy design pattern?

605