Here is a simple example that shows that an instance of anonymous inner class can be created outside its outer class.
The class Outer has a method which returns an anonymous class object. This method is called in class Test41, and the print statement shows indeed an anonymous inner class object is created.
C:\JavaRanch>javac Test41.java
C:\JavaRanch>
java Test41
I am an anonymous class object
Outer$1@273d3c
[This message has been edited by huiying li (edited March 23, 2001).]