线程练习
class ThreadDmeo extends Thread{
private String name;
ThreadDmeo(String name){
this.name=name;
}
public void run(){
//System.out.println(Thread.currentThread().getName()+name+"正在登入");
for(int i=1;i<20;i++){
System.out.println(Thread.currentThread().getName()+"......."+i);
}
}
}
public class text28{
public static void main(String args[]){
ThreadDmeo T1=new ThreadDmeo("小明");
ThreadDmeo T2=new ThreadDmeo("小淮");
T2.start();
T1.run();
}
}