正在加载图片...
public void runt for(int i=0; i<5; i++) ∥睡眠一段随机时间 Thread. sleep((ong Math. random0* 1000)); /显示线程名称 System, out. print(getNameo); G carrepublic void run(){ for(int i=0;i<5;i++){ // 睡眠一段随机时间 Thread.sleep((long)(Math.random() * 1000)); //显示线程名称 System.out.print(getName()); } } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有