Kalpana Periasamy wrote:Then, why is the method present in Object class?
Probably so we can always just call super.clone() and it will work.
Also, note that clone() and Cloneable have been around since the very beginning, or nearly so. A lot of decisions were made in the early days of Java where the designers didn't have the complete picture yet and didn't know where Java's path would lead. or else they simply had to go with what was the most expedient at the time in order to meet a release date.
Whenever you see something that looks a little bit weird, check to see if it's been around for a long time, and be willing to consider it in the context of the Java landscape 15-18 years ago.