What happens when a method-local inner class tries to access a local variable that goes out of scope after the method finishes?
The method-local inner class can access the variable if it is passed to it as a parameter.
That's partially correct. While parameters can be used, the variable must also be final or effectively final to be accessible.
Can you explain what it means for a variable to be 'effectively final'?