public class TestClone extends Person {
public static void main(String[] args) {
Person p = new Person();
p.clone();
}
}
//there's a compile error here (**clone() has protected access in 'java.lang.Object'). I know how to use clone() in java. The point here is, class Person extends Object, then Person should be able to use clone() in Object because Protected method in superclass is visible to subclass. But here comes a compile error, why...