Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
let O be the enclosing class of which C is a *member*, OR
let O be the *innermost* lexically enclosing class of C.
Otherwise, C is an inner member class (�8.5).
* If the class instance creation expression is an unqualified class instance creation expression, then:
o If the class instance creation expression occurs in a static context, then a compile-time error occurs.
o Otherwise, if C is a member of an enclosing class then let O be the innermost lexically enclosing class of which C is a member, and let n be an integer such that O is the nth lexically enclosing class of the class in which the class instance creation expression appears. The immediately enclosing instance of i is the nth lexically enclosing instance of this.
o Otherwise, a compile-time error occurs.
* Otherwise, the class instance creation expression is a qualified class instance creation expression. The immediately enclosing instance of i is the object that is the value of the Primary expression.
SCJP2. Please Indent your code using UBB Code
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I claim there is only *one* lexically enclosing class of which C is a *member*. *innermost* does not make sense.
SCJP2. Please Indent your code using UBB Code
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |