我有一个代码,我有一个小问题。
public class Out {
int value = 7;
void print() {
int value = 9;//how to access this variable
class Local {
int value = 11;
void print() {
int value = 13;
System.out.println("Value in method: " + value);
System.out.println("Value in local class: " + this.value);
System.out.println("Value in method of outer class: " + value);//here
System.out.println("Value in outer class: " + Out.this.value);
}
}
}
}
上面的代码描述了我的问题。