Possible Duplicate:
How to properly override clone method?
Can anyone give me any example where we can use the same?
Possible Duplicate:
How to properly override clone method?
Can anyone give me any example where we can use the same?
there might be situations when you plan to modify the object, and you don't want to modify the method caller's object. If you decide that you need a local copy, you can perform the operation by using the clone() method of the Object class.