摘要: 1创建,2就绪,3终止 public class ThreadState { public static void main(String[] args) throws InterruptedException { Thread myThread=new Thread(()->{ System.ou 阅读全文
posted @ 2022-02-09 14:32 余生请多指教ANT 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 创建线程的方式:1.继承Thread,2实现Runnable接口,3 实现Callable接口,4Future接口 1. //实现Thread类 public class MyThread extends Thread { @Override public void run() { System.o 阅读全文
posted @ 2022-02-09 14:15 余生请多指教ANT 阅读(23) 评论(0) 推荐(0) 编辑