Java
Method references

by Benny Neugebauer

movies.stream().forEach(movie -> System.out.println(movie));

movies.stream().forEach(System.out::println);

movies.forEach(System.out::println);

https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html#forEach-java.util.function.Consumer-

Andrey Rybak

Sign in to comment!