Variable capture in Lambda
问题 I can't think why the captured variables are final or effectively final in lambda expressions. I looked over this question and really quite didn't get the answer. What is this variable capture? As I searched solutions for my problem, I read that these variables are final because of concurrency problems. But for such situation why can't we lock the task code in the lambda with a reentrant lock object. public class Lambda { private int instance=0; public void m(int i,String s,Integer integer