How can we design/implement singleton object?

Answer Posted / todd d. roling

public enum Singleton {
INSTANCE;
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is clean architecture?

576


How did you design your unit tests?What about integration tests?

1804


Suppose we have file(ps), dont know how many records are there. Move half of the records to 2 files. How can we do?

586


Why singleton beans are not thread safe?

579


What are the examples of the behavioral design patterns?

604






Write the code for a singleton class?

622


What is architecture and what is design?

596


What are the types of the proxy design you will get in the design pattern?

575


What are the most popular design patterns?

582


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

2032


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

2728


What are the types of participants of the prototype design pattern you will get?

590


Is singleton an anti pattern?

587


Quartus II software version 6.0 is available for which operating systems (OS)?

1923


Give me example of chain of responsibility design pattern?

625