I have a static method that accepts a couple of parameters. Inside the method I am creating a new object and attaching a new listener to it. The problem is that the listener blo
Declare the parameters for the static method as final or assign the passed in arguments to final local variables in the static method before you create your listener. You can use the final references from inside the anonymous class definition.