Java Lambda Expressions #3 - Variable Capture

1 year ago
21

Java Lambda Expressions cannot have their own state, like other classes can. The only way a Java lambda expression can have any kind of internal state is by referencing a variable declared outside the lamdba expression. This video explains how that is done, and the rules for doing so.

This video is part of a playlist on Java lambda expressions which you can see here:

https://www.youtube.com/playlist?list=PLL8woMHwr36HQhhPPdV_T8rigbuywMpD7

I also have a text version of the Java lambda expression playlist here:

http://tutorials.jenkov.com/java/lambda-expressions.html

Loading comments...