Solved

Avoid cloning of singleton object

Posted on 2013-10-24
2
275 Views
Last Modified: 2013-10-28
Hi,

Let me know  how to avoid the cloning of the singleton object.

Thanks
0
Comment
Question by:roy_sanu
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 135 total points
ID: 39597705
Make it final. Then the fact that is does NOT implement Cloneable will render it impossible to clone()
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39604960
:)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
V.simple question about Android packages and libraries 1 36
jsp insert to database example 2 58
CSV file parsing thru Java 13 39
How to log java errors in tomcat 8 23
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question