| |
GeekInterview.com > Interview Questions > J2EE > Java Patterns
| Print | |
Question: What is singleton pattern ??
|
| April 04, 2007 06:05:24 |
#4 |
| Divesh Kumar |
Member Since: Visitor Total Comments: N/A |
RE: What is singleton pattern ?? |
| You need to override clone method, in order to prevent the class from being clone only if the class implements Cloneable interface. Object class by itself does not implement Cloneable so a CloneNotSupportedException will be thrown if you call clone on an instance of class that does not implement Cloneable |
| |
Back To Question | |