table of Contents
Second, the translation error:
Third, the source of the error:
3.1, use variables within Lambda external abnormalities
3.2, using variable external thread of abnormal
First, the original error:
Variable used in lambda expression should be final or effectively final
Second, the translation error:
Variable lambda expressions used should be final or effective final
Third, the source of the error:
3.1, use variables within Lambda external abnormalities
Note: Although here is Lambda expressions using variables should be final, but in fact the problem also occurs in the thread.
3.2, using variable external thread of abnormal
Note the threads here in fact with just a shorthand for a prototype Lambda nothing.
Fourth, the solution
Define a variable value, equal to i, and then to the internal thread to use in jdk1.8 is able to identify and does not throw an exception, but if you write the value ++ program will continue to be thrown under warning
After using the value ++ program throws an exception