public class myThread extends Thread {
private String who;
public myThread(String str)
{
who=str;
}
public void run()
{
for(int i=0;i<5;i++)
{
try{
sleep(10);
}
catch(InterruptedException e){
System.out.println(who+"_正在运行");}
System.out.println(who+"幸福的像花一样");
}
}
}
public class app1 {
public static void main(String args[]){
myThread you=new myThread("你");
you.start();
}