About Question com.enthuware.ets.scjp.v6.2.354 :
Posted: Wed Jul 27, 2011 3:36 pm
Which statements concerning the relation between a non-static inner class and its outer class instances are true?
b.Member variables of the outer instance can always be referred to using only the variable name within the inner instance.
The answer b is correct according to the following program.
class Outer{
private int x=7;
class Inner{
public void seeOuter(){
system.out.println("Outer x is" +x);
}
}
}
b.Member variables of the outer instance can always be referred to using only the variable name within the inner instance.
The answer b is correct according to the following program.
class Outer{
private int x=7;
class Inner{
public void seeOuter(){
system.out.println("Outer x is" +x);
}
}
}