is it cloning is possible in singleton pattern please explain

is it cloning is possible in singleton pattern please explain
LVL 9
Manikandan ThiagarajanSenior consultantAsked:
Who is Participating?
 
ksivananthConnect With a Mentor Commented:
the default implementation of clone method will throw CloneNotSupportedException, so unless you implement clone method of your singleton, its in good shape
0
 
ksivananthCommented:
it exploits the pattern, you shouldn't allow clone for singleton intended objects IMO
0
 
Sharon SethCommented:
You mean you want to clone the singleton object ? It is possible , but yo don't want to do it . If you clone , you no longer use a singleton
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
when i clone is it throw any error
0
 
Manikandan ThiagarajanSenior consultantAuthor Commented:
is it throw any exception when i clone
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.