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