扫码下载编程狮APP
import java.util.function.BinaryOperator; public class Main { public static void main(String[] args) { BinaryOperator<Integer> adder = (n1, n2) -> n1 + n2; System.out.println(adder.apply(3, 4)); } }
运行结果如下:
联系方式:
扫描二维码
下载编程狮App
扫码关注 领资料包