TD1: Cleanup the exo1 code.
[TD_SR.git] / TD1 / exo2 / ThreadJob.java
similarity index 74%
rename from TD1/exo2/ExThread.java
rename to TD1/exo2/ThreadJob.java
index 387ea8da3a05f9d8091015960c8edef9b318edcd..dae83baa750588b57e0523d1a0797e56241951e9 100644 (file)
@@ -1,9 +1,8 @@
 import java.util.Random;
 
-public class ExThread implements Runnable {
-    String threadName;
+public class ThreadJob implements Runnable {
 
-    ExThread(String name) {
+    ThreadJob(String name) {
         setName(name);
     }
 
@@ -22,7 +21,7 @@ public class ExThread implements Runnable {
                 // 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");
         }
     }
 }