Originally posted by Krishna Mir:
How can we access non overridden methods of anonymous inner class?
If you mean methods
inherited from the superclass (and just not overridden in the anonymous class), then the approach is straight forward: myInstance.myMethod();
But if you mean new methods
defined in the anonymous class, then you can't do it. Remember, a reference to an anonymous class instance is automatically upcast to the declared supertype. So if a method isn't in that supertype, then you can't get to it.