package unit8; public class Mainthread { public static void main(String[] args) { Thread t = new Thread().currentThread(); System.out.println("当前的线程是:"+t); t.setName("MyJavaThread"); System.out.println("当前的线程是:"+t); try{ for(…
java 线程.线程池基本应用演示样例代码回想 package org.rui.thread; /** * 定义任务 * * @author lenovo * */ public class LiftOff implements Runnable { protected int countDown=10; private static int taskCount=0; private final int id=taskCount++; public LiftOff(){} public Lift…