Reputation: 801
How to use function reference in this case (function reference instead x.length())?
private static Function<String, Integer> f1 = x -> x.length();
Upvotes: 0
Views: 69
Reputation: 2286
Like this
private static Function<String, Integer> f1 = String::length;
Upvotes: 2