Member classes introduce complications to the name space since there is now both scope (since a member class has a containing class) and inheritance (since a member class can have a superclass). Scope and inheritance form two distinct hierarchies. |
If a member class refers to a name which is both in its containing class and its superclass, the name in the superclass is used as it is considered to be in the current scope, so inheritance takes precedence. |
The Java compiler may require you to make this clear in the syntax by using this.x for an inherited name and A.this.x for a name in containing class A. |