创建线程的方式三(jdk8-lambda)

mac2022-06-30  105

public class lambdaTest6 { public static void main(String[] args) { new Thread(()->{ for(int i=0;i<100;i++) { System.out.println("一边学习lambda"); } }) .start(); new Thread(()-> System.out.println("一边学习奔溃")) .start(); } }
最新回复(0)