public static void main(String[] args) {
/*切分词工作线程*/
class ModelIdentifyWorkThread extends Thread {
String msg;
public ModelIdentifyWorkThread(String msg) {
super();
this.msg = msg;
}
public void run() {
try {
int count = 0;
while (true){
System.out.println(msg+count);
if(count == 50){
Thread.sleep(5000);
}
count ++;
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
ModelIdentifyWorkThread x = new ModelIdentifyWorkThread("大傻子");
x.start();
}
注意:本文归作者所有,未经作者允许,不得转载