Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Prevent cloning of a singleton object
Home
Design Patterns
Prevent cloning of a singleton object
0
votes
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
How to prevent cloning of a singleton object?
#designpatterns
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 16, 2019
by
DavidAnderson
Throw exception within the body of clone() method.
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: Clone of a singleton object
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: What are the difference between a static class and a singleton class?
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: What are the drawbacks of using singleton design pattern?
asked
Oct 17, 2019
in
Design Patterns
by
Robin
#designpatterns
singleton-pattern
singleton-pattern-drawbacks
0
votes
Q: create Singleton class in java
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: Singleton pattern?
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: a single class while making sure that only single object gets created
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: What is Dependency Injection in Design patterns?
asked
Aug 12, 2020
in
Design Patterns
by
RShastri
#designpatterns
0
votes
Q: Memento pattern
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: Mediator pattern
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
0
votes
Q: Entities of Service Locator pattern
asked
Oct 16, 2019
in
Design Patterns
by
DavidAnderson
#designpatterns
...