import java.util.Random;
-public class ExThread implements Runnable {
- String threadName;
+public class ThreadJob implements Runnable {
- ExThread(String name) {
+ ThreadJob(String name) {
setName(name);
}
// this part is executed when an exception (in this example InterruptedException) occurs
}
String threadName = Thread.currentThread().getName();
- System.out.println(threadName + " has sleept for " + sleep_time + " ms for the " + (j + 1) + " times");
+ System.out.println(threadName + " has slept for " + sleep_time + " ms for the " + (j + 1) + " times");
}
}
}