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 skills do you think are necessary for a UI UX Designer?

1 Answers  


What are the different types of Design Patterns and Explain them?

3 Answers   Genpact, Gradatim, Gul Ahmed, TCS, Wipro,


Which design patterns have you used in your project ?

0 Answers   QuestPond,


Using any system, product, or service your organization provides, identify the human system roles for the product.

0 Answers  


What are External Style Sheets?

1 Answers  


What is aop design?

0 Answers  


What is the publish/subscribe model?

1 Answers  


Can we use an equated value as operands for an MVC ? Reason for the same.

0 Answers   Ness Technologies,


Show us an example of a design that can solve a business problem.

1 Answers  


What is onion architecture?

0 Answers  


2. Create your own de&#64257;nition of a system. Based on the “system” de&#64257;nitions a. Identify your viewpoint of shortcomings in the de&#64257;nitions. b. Provide rationale as to why you believe that your de&#64257;nition overcomes those shortcomings. c. From an historical perspective, identify three precedented systems that were replaced by unprecedented systems.

0 Answers   IBM,


What is the creational design pattern?

0 Answers  


Categories