Chun
I think what u asked is the access of protected members outside the class.
Object and the user defined classes are in seperate packages
try compiling this code and you will get your doubts cleared
public class
Test {
public static void main(String args[]){
new Object().finalize(); // will give compiler error
}
}
class Superclass {
protected void meth(){}
}
public class Test extends Superclass{
public static void main(String args[]){
new Superclass().meth(); // wont give compile error because superclass and Test are in the same package.
}
}
Cherry