package _5_20;
public class TestLambda {
public static void show(MyFunctionalInterface myInter) {
myInter.method();
}
public static void main(String[] args) {
show(() -> System.out.println("方法实现 one"));
show(() -> {
System.out.println("方法实现 two");
Random ran = new Random();
System.out.println(ran.nextInt(100));
});
}
}
663

被折叠的 条评论
为什么被折叠?



