【文件属性】:
文件名称:蓝桥杯比赛
文件大小:356KB
文件格式:DOCX
更新时间:2021-11-22 11:18:01
代码
千万别问为什么。就想赚个资源所需的public void run(){
System.out.println(getName()+"是一个演员");
int count=0;
boolean keepRuning=true;
while(keepRuning){
System.out.println(getName()+"登台演出"+(count++));
if(count==50){
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}
if(count>100){
keepRuning=false;
}
System.out.println("演出结束了");
}
}