Say I have the follow code:
class Outer {
int n;
class Inner {
}
}
Is it possible for an object of type Inner to access the instance variable n of its Outer object? (When I say its, I mean the Outer object that its associated with.) I understand that within a method of an inner class you can access outer class instance variables and also within the body (for example an instance variable for Inner could initialize to the value of an instnace variable of Outer), but is it possible to more directly access the Outer instance variables? For example, if inner were an object of type Inner, is there anything like inner.n given the code above?
Sorry for the block of text: basically, if inner were an object of type Inner, is there anything like inner.n given the code above?