java - "variable is accessed from within inner class needs to be declared final" error -


i've got error while trying use local member of 1 class in inner class inside. know declare final solve issue read java 8 should handle automaticlly, i'm using intellij java 8 , still not compile. there other way fix without declare final? thanks.

i know declare final solve issue read java 8 should handle automatically.

java 8 handle if variable effectively final.

i can think of 2 possible explanations:

  1. maybe variable not effectively final. try explicitly declaring final. if compilation error (e.g. saying trying modify final) variable isn't final.

  2. maybe haven't configured intellij , project java 8; e.g.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -