Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How can we design/implement singleton object?

Answers were Sorted based on User's Feedback



How can we design/implement singleton object?..

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

How can we design/implement singleton object?..

Answer / todd d. roling

public enum Singleton {
INSTANCE;
}

Is This Answer Correct ?    2 Yes 1 No

How can we design/implement singleton object?..

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

Post New Answer

More Design Patterns Interview Questions

What are the languages used in the design pattern?

0 Answers  


Explain three types of components comprise an application design?

0 Answers  


What is the creational design pattern?

0 Answers  


what are design patterns..?what design patterns used in .net.

1 Answers  


How can you know that your design is successful?

3 Answers  


How can you conduct UX evaluation?

3 Answers  


What are the most commonly used design patterns?

0 Answers  


Where do you find inspiration and what are your long-term goals?

3 Answers  


What is clean architecture?

0 Answers  


What is the use of design patterns?

0 Answers  


What are the advantages of asynchronous architectures?

1 Answers   Microsoft,


What are the design patterns you know explain?

0 Answers  


Categories