Those are local variables. That means they live on the stack and cease to exist as soon as the method ends. However, the anonymous inner class instance can (and usually does) continue to exist long after the method ends. So the inner cannot use the same variables as the method, since they will cease to be valid while the inner still needs them.
The approach that
Java takes to resolve this is to make a separate copy of those variables for the inner. However, now we have the problem that we have two independent copies of what's supposed to be the same variable. If one copy changes, the other copy won't know about it, which is not desired behavior for what our code views as the same variable. So to solve that, Java requires that the variables be final. That way, the inner can get its own copy, and it will always have the same value that the method sees, since neither one can change.