比如:
public class Score2 {
Timer timer;
public static void main(String[] args){
Score2 score2=new Score2();
score2.ScoreTimer();
}
public void ScoreTimer(){
timer = new Timer();
timer.schedule(new ScoreTask(),10000);
}
class ScoreTask extends TimerTask {
Score1 score=new Score1();
public void run(){
score.scoress();
}
}
}
------解决方案--------------------
Score1 怎么写的?有scoress()方法吗?