一、创建线程的三种方式
第一种
public class App { public static void main(String[] args) { Thread thread = new Thread(() -> { while (true) { System.out.println("testThread"); } }); thread.start(); } }
一、创建线程的三种方式
第一种
public class App { public static void main(String[] args) { Thread thread = new Thread(() -> { while (true) { System.out.println("testThread"); } }); thread.start(); } }
相关文章: