阅读下列程序,请写出该程序的功能。
import java util.*;
class MyThread extends Thread {
int pauseTime; String name;
public MyThread (int x, String n) { pauseTime = x; name = n; }
public void run() {
for(int i = 1;i <= 4; i++) {
try {
System.out.println(name +":" +new Date(System.currentTimeMillis()));
Thread.sleep(pauseTime);
}catch(Exception e){ }
}
}
}
public class Test36{
static public void main(String[] args) {
MyThread thread1 = new MyThread (1000,"Fast Thread"); thread 1 .start();
MyThread thread2 = new MyThread (3000,"Slow Thread"); thread2.start();
}
}