JAVA : SingleTon Break
JAVA : SingleTon Break
Overcome
Overcome
- Preferred way is not to implement Cloneable interface as why should one wants to create clone() of Singleton
- And if you still do, then just throw Exception from clone() method as “Can not create clone of Singleton class”.
No comments:
Post a Comment