Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavalambdas and method refsSingle-choice MCQ

Given a method reference bound to an instance vs. unbound, which call is valid?

String prefix = "Mr. "; Function<String, String> f = prefix::concat; // line A BiFunction<String, String, String> g = String::concat; // line B System.out.println(f.apply("Smith") + " / " + g.apply("Dr. ", "Jones"));