📄 threadtest.java
字号:
package hl;
public class ThreadTest extends Thread {
private long sleepTime=1000;
private String word = null;
fc fcinstance;
public ThreadTest() {
fcinstance = fc.getInstance();
}
public void init(long sleepTime,String word){
this.word = word;
this.sleepTime = sleepTime;
}
public void run(){
try{
while (true) {
String result = fcinstance.seg(word.getBytes(), 1, 0, 0, 0);
System.out.println((result.substring(result.indexOf(fcinstance.pos) + fcinstance.pos.length())));
sleep(sleepTime);
}
}catch(InterruptedException e){
System.out.print("閫
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -