扫码下载编程狮APP
import java.util.function.IntConsumer; public class Main { public static void main(String[] args) { // no need to { } start(e -> System.out.print("Release year: " + e), 2013); } public static void start(IntConsumer cons, int d) { cons.accept(d); } }
运行结果如下:
联系方式:
扫描二维码
下载编程狮App
扫码关注 领资料包