What does a variable being “effectively final” mean? [duplicate]
问题 This question already has answers here : Difference between final and effectively final (13 answers) Closed 5 years ago . The documentation on Anonymous Classes states An anonymous class cannot access local variables in its enclosing scope that are not declared as final or effectively final. I don't understand what does a variable being "effective final" mean. Can someone provide an example to help me understand what that means? 回答1: Effectively final means that it is never changed after