I am just reading about anonymous classes an am getting a little confused.
I have 2 classes as shown below, the names are arbitary and simply for
testing purposes. I am not able to compile and get the following compilation errors:
Description Resource Path Location Type
The method bMethod() is undefined for the type InnerLocalClass OuterClass.java /anonymousclasstest/src/anonymousclasstest line 31
Java Problem
As I understood it, I thought, the use of the anonymous class simply extends the SuperClass, InnerLocalClass in this case. If that is the case wouldn't the InnerLocalClass innerlocalClass = new InnerLocalClass(aInt){...} instanstiate a new object, innerlocalClass, that would simply be an extended version of InnerLocalClass? How do I access the bMethod() method? What am I doing wrong?