I noticed that:
class A {
ClassB b = new ClassB() {
}
}
Whenever I use a keyword thisinside an anonymous class, it thisrefers to the surrounding outer class / enumeration, and not to the anonymous class.
Does this mean that it thiscan never represent an anonymous class? Just "normal" classes and enumerations?
Also, can thisor superrepresent an interface?
source
share