posted 23 years ago
The answer is false. You can create an anonymous class outside of a method for instance you can create an anonymous class to set up an instance variable.
Here is an example:
Wasn't sure about this until I tried it, but compile and run it and you will get:
I am in Anonymous method
printed out to the command line.
Bill