Hi,
that is right. however enclosing classes can access private members of the nested classes. as nested classes/inner classes are there to serve the enclosing object (Kathy), so it make sense.
so as the code is being accessed within Test009, its valid. if u try to access this method out side Test009, u will get exactly what u said. i.e compile time error stating the method is private.
class Test{
public static void main(
String [] s){
Test009.Inner inner1=new Test009().new Inner();
inner1.method();//Oooops...
}
}
[ June 06, 2003: Message edited by: G Nadeem ]