We would like to know how to use Integer::valueOf as method reference for Function.
import java.util.function.Function; public class Main { public static void main(String... args) { Function<String, Integer> toInteger = Integer::valueOf; System.out.println(toInteger.apply("")); } }