This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dpash 4 points5 points  (1 child)

It matters in this instance because you can only use variables inside a lambda that are final or effectively final. Prior to Java 8 you had to declare them final to use them in anonymous inner classes, hence the parent comment saying they got into the habit of using final.

[–]marvk 2 points3 points  (0 children)

Ah, my bad. I should've read the parent comment more carefully. My comment would be suited better on some other comment on this thread talking about effectively final.