-2

Possible Duplicate:
How to properly override clone method?

Can anyone give me any example where we can use the same?

Community
  • 1
  • 1
user1945064
  • 199
  • 3
  • 4
  • 18

1 Answers1

0

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.

Avinash Nair
  • 1,984
  • 2
  • 13
  • 17