posted 24 years ago
The output printed is:
this -> Inner
Outer.this -> Outer
Inner.this -> Inner
Outer.super -> Base
this$0 -> Outer
Please refer to the last 3 print statements.
Are they correctly written? Will they always work as per the
output shown above.
They imply:
1. ClassName.this is equivalent to this.
2. Similar to "this", "super" can also be qualified with a
class name of the enclosing class
3. "this$0" is the reference to the outer-most class.
This seems to be beyond the scope of the exam, but you never know.