I believe your forsok variable could also be a class variable in the outer class as well, that way you can access it from other methods.
You could implement a Game of Nim type thing, or a...
Type: Posts; User: KevinWorkman
I believe your forsok variable could also be a class variable in the outer class as well, that way you can access it from other methods.
You could implement a Game of Nim type thing, or a...
Right, but why? It sounds like that while loop is never exiting, which is why I suggest reconsidering your logic.
What exactly is that while loop doing?
I think you might consider refactoring your code. Anonymous inner classes aren't always the way to go.