You might want to show the type of the Interface this is assigned to, but for example
Function<String, String> f = String::toUpperCase;
Is equivalent to
Function<String, String> f = s -> s.toUpperCase();
See https://docs.oracle.com/javase/tutorial/java/javaOO/methodreferences.html
1.4m articles
1.4m replys
5 comments
57.0k users