请求帮忙解释代码
class Person implements Cloneable{ //实现private String name;
private int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public void setAge(int age) {
this.age = age;
}
public void display(){
System.out.println("name :"+name+"\tage:"+age);
}
protected Object clone(){
Person p = null;
try {
p = (Person) super.clone();
} catch (CloneNotSupportedException ex) {
}
return p;
}
}
public class TestKL {
public static void main(String[] args) {
Person p1 = new Person("tom",18);
Person p2 = (Person)p1.clone();
System.out.println(p1.equals(p2));
p2.setAge(18);
p1.display();
p2.display();
}
}
请问这程序中的: protected Object clone(){
Person p = null;
try {
p = (Person) super.clone();
} catch (CloneNotSupportedException ex) {
}
return p;
这段语句是啥意识?