A local method variable is a local variable declared in the method scope.
Therefore, the non-method-local variable must be a variable with a wider scope, such as the scope of the class.
I can’t say exactly why it can be said that they are problematic. Perhaps this is simply because they inject mutable state into objects.
source
share