I don\'t understand the mechanism of cloning custom object. For example:
public class Main{ public static void main(String [] args) { Person pe
There's no need to create the object explicitly here in clone() method. Just by calling super.clone() will create the copy of this object. It will perform the shallow clone.
clone()
super.clone()