Even if the inner class is defined in a static method, that doesn't mean the class is static. The best thing for you to do would be:
Just write a small program, and in it's main() method create an anonymous class. Now after compiling it, you will see there are 2 .class files: (Assume the name of you class is TestClass.java)
TestClass.class and TestClass$1.class
Now, run javap TestClass$1
You see that this class is not static. Play with it a little bit and you'll understand. Also define a static class and run the same
test.
Another point,
you should be able to refer to a static class by it's name. And anonymous class doesn't have one. You always do 'new' to use an anonymous class.
(BTW, anonymous class do have a name but that name is not known to the programmer. In the above example, the name of the anonymous class is TestClass$1 !)
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new
Pattern)
www.enthuware.com/jqplus
[This message has been edited by Paul Anil (edited December 19, 2000).]