“variable is accessed from within inner class needs to be declared final” error
问题 I've got this error while trying to use a local member of one class in inner class inside. I know that declare it as final will solve the issue but I read that Java 8 should handle it automaticlly, I'm using Intellij with Java 8 and it still does not compile. Is there any other way to fix it without declare it as final? thanks. 回答1: I know that declare it as final will solve the issue but I read that Java 8 should handle it automatically. Java 8 will handle it if the variable is effectively