java - How can "this" of the outer class be accessed from an inner class? -
is possible reference this
within java inner class?
i.e.
class outer { void amethod() { newclass newclass = new newclass() { void bmethod() { // how access "this" (pointing outer) here? } }; } }
you can access instance of outer class this:
outer.this
Comments
Post a Comment