Thanks for the answer. I tried cloning a singleton. It was exactly the same as you have told. Like the non singleton instance.
Type: Posts; User: Pratyush
Thanks for the answer. I tried cloning a singleton. It was exactly the same as you have told. Like the non singleton instance.
I got your context of getting confused that if suppose I am making a class singleton whats the exact reason I would like to clone it. Its just for my understanding I need to know when I make a...
Not tried cloning an instance ever but I know that the class needs to implement the Cloneable interface and override the clone method of the object's class(Please correct if I am wrong anywhere). But...
I know to make a singleton class but if suppose I require to clone it how can that be done.
If anybody can reply with sample code it would be better.
Thanx in advance!