Then, I tried renaming 'method 2' from method() to methodX(). After that, I noticed that 'method 1' started getting called and the output was:
In Test:method() until a StackOverflow occured.
How does 'method-call 1' really work. Why doesn't a compiler error occur at the call stating that there is no such method defined in the anonymous class..