From: "Stuart Ballard" <[EMAIL PROTECTED]>
Date: Tue, 16 May 2006 10:08:36 -0400
> Because inner classes *are* within the body of the top level class, perhaps?
> :)
Yes, in the following example, the private member of the inner class is
accessible to the top level class.
public class ZZ {
public class ZZ1 {
private int a;
}
ZZ1 zz1;
public ZZ() {
zz1 = new ZZ1();
zz1.a = 1;
}
}
But the following cannot be compiled because "a" in type "ZZ$ZZ1" is
not accessible. Isn't this an access from within the top level class?
public class ZZ {
public class ZZ1 {
private int a;
public void foo() {}
}
ZZ1 zz1;
public ZZ() {
zz1 = new ZZ1() {
public void foo() {
a = 1;
}
};
}
}
_______________________________________________
kaffe mailing list
[email protected]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe