Method-References

1 post in this section

Method References: Four Kinds and When to Use Each

What Are Method References? Method references are a signal to the reader: “this lambda does exactly one thing — it calls this existing method.” When the entire body of a lambda is a single method call, replacing it with a method reference removes noise without losing information. Knowing which of the four kinds to apply in each context is what separates fluent Java 8 code from code that merely uses the syntax.

Continue reading »