in Education by (55.8k points)

What kind of variable you can access in an lambda expression??

1 Answer

0 votes
by (55.8k points)

What kind of variable you can access in an lambda expression in Java8? in Java8?

Using lambda expression, you can refer to final variable or effectively final variable (which is assigned only once). Lambda expression throws a compilation error, if a variable is assigned a value the second time.

...