Hi, can anybody please let me know what this clone() method is? And what is it used for? Going through the API I found that it is used to return a copy of an object, what I'm unable to understand is - "what it is required for?"
The idea is that a copy of an object can be manipulated and examined by other objects in the application with no risk of damaging the original object. The standard clone method returns a "shallow" clone; you may need a "deep" clone for real security.