Timer类程序不明白
package org.dong.timer;
import java.util.Timer;
import java.util.TimerTask;
public class TimerTest {
public static void main(String[] args)
{
Timer timer1=new Timer();
Timer timer2=new Timer();
Timer timer3=new Timer();
for(int j=0;j <30;j++)
{
if(j%3==0)
timer1.schedule(new showme(1) , 10000);
else if(j%3==1)
timer2.schedule(new showme(3), 10000);
else
timer3.schedule(new showme(2), 10000);
}
}
}
class showme extends TimerTask
{
int taskName;
public showme(int q)
{
taskName=q;
}
public void run() {
// TODO Auto-generated method stub