B
bugbear
Is there a way to name the "outer" class?
I understand the Outer is NOT a super-class
of inner. Is inner "almost" stand alone
or is there an eaqsy way (other than Outer.a)
that the method f() can refer to the
string a from Outer?
BugBear
class Outer {
public static final String a = "a";
static class inner {
String f() {
return a; // doesn't work.
return super.a; // doesn't work
return Outer.a; // works but is not what I want
}
}
}
I understand the Outer is NOT a super-class
of inner. Is inner "almost" stand alone
or is there an eaqsy way (other than Outer.a)
that the method f() can refer to the
string a from Outer?
BugBear
class Outer {
public static final String a = "a";
static class inner {
String f() {
return a; // doesn't work.
return super.a; // doesn't work
return Outer.a; // works but is not what I want
}
}
}