This post originated from an RSS feed registered with Java Buzz
by justin cater.
Original Post: Put Your Java 8 Method References to Work
Feed Title: Java Code Geeks
Feed URL: http://feeds.feedburner.com/JavaCodeGeeks
Feed Description: Java 2 Java Developers Resource Center
Method References As we all know by now, we can use Method References, like String::isEmpty, in Java 8 to reference a method that is being used when we, for example, stream over elements. Take a look at this code snippet: Stream.of("A", "", "B").filter(Stream::isEmpty).count(); which will produce the result 1 (because there is just one empty ...