您的位置:首页 > 其它

1.26作业

2016-01-26 08:32 253 查看
package come.hanqi;

public class zuoye extends Thread {
public void run(){
zy();
}
public void zy(){
for(int i=0;i<20;i++){
System.out.println("张昊哲好帅!");
try {
Thread.sleep(100);
} catch (InterruptedException e) {

e.printStackTrace();
}
}
}
}


package come.hanqi;

public class TestThread {

public static void main(String[] args) throws InterruptedException {

zuoye zuo=new zuoye();
zuo.zy();
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: