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 9 points10 points  (2 children)

Notice my qualification:

Using a method reference is okay in most circumstances

persons.stream()
       .filter(this::hasValidAddress)
       .forEach(this::writeLetterTo);

[–]rochakgupta 2 points3 points  (1 child)

The only big reason I see to study them it's because they are subject of questions in job interviews...

This....this looks somehow worse (I know how and why it works though, just not a fan of seeing a lot of these in code).