Which two statements enforce the singleton nature of the design?

You want to create a singleton class by using the Singleton design pattern.
Which two statements enforce the singleton nature of the design?
A. Make the class static.
B. Make the constructor private.
C. Override equals() and hashCode() methods of the java.lang.Object class.
D. Use a static reference to point to the single instance.
E. Implement the Serializable interface.

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which two statements enforce the singleton nature of the design?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.