exam questions

Exam 1z0-809 All Questions

View all questions & answers for the 1z0-809 exam

Exam 1z0-809 topic 1 question 19 discussion

Actual exam question from Oracle's 1z0-809
Question #: 27
Topic #: 2
[All 1z0-809 Questions]

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 private.
  • B. Make the constructor equals() and hashCode() methods of the java.lang.Object class.
  • C. Override static reference to point to the single instance.
  • D. Use a Serializable interface.
  • E. Implement the
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
M_Jawad
Highly Voted 4 years, 6 months ago
B. Make the constructor private. D. Use a static reference to point to the single instance.
upvoted 5 times
...
steefaand
Most Recent 5 months, 3 weeks ago
Selected Answer: BC
B and C are correct.
upvoted 1 times
...
iSnover
5 months, 3 weeks ago
Selected Answer: BD
The answer is BD: B. Make the constructor private. D. Use a static reference to point to the single instance.
upvoted 1 times
...
jduarte
3 years, 6 months ago
Answer B and C.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago