public class OuterClass {
innerClass in = new innerClass();
public void ouf() {
in.inf(); }
class innerClass {
innerClass() {
public class OuterClass {
innerClass in = new innerClass();
public void ouf() {
in.inf();
}
class innerClass {
innerClass() {
}
public void inf() {
}
int y = 0;
}
public innerClass doit() {
// y=4;
in.y = 4;
return new innerClass();
}
public static void main(String args[]) {
OuterClass out = new OuterClass();
OuterClass.innerClass in = out.doit();
OuterClass.innerClass in2 = out.new innerClass();
}
}
请问 ouf() 这是什么,是定义一个方法吗?in.inf(); 这又做何解释啊。in. 代表什么的呀
看了这段代码,模模糊糊的 |