Online Java Compiler By
JavaTpoint.com
import java.util.function.BiFunction; class Arithmetic{ public static int add(int a, int b){ return a+b; } } public class MethodReference3 { public static void main(String[] args) { BiFunction
adder = Arithmetic::add; int result = adder.apply(10, 20); System.out.println(result); } }
Output