摘要:
1创建,2就绪,3终止 public class ThreadState { public static void main(String[] args) throws InterruptedException { Thread myThread=new Thread(()->{ System.ou 阅读全文
摘要:
创建线程的方式:1.继承Thread,2实现Runnable接口,3 实现Callable接口,4Future接口 1. //实现Thread类 public class MyThread extends Thread { @Override public void run() { System.o 阅读全文