package cn.dali5.code02;
import java.sql.SQLOutput;
/*函数式接口作为方法参数使用*/
public class Demo02 {
public static void main(String[] args) {
startThread(()->{
System.out.println(Thread.currentThread().getName()+"启动");
});
}
public static void startThread(Runnable rab){
new Thread(rab).start();
}
}
函数式接口作为方法参数使用
最新推荐文章于 2024-04-11 14:52:04 发布