Use stderr where appropriate.
[TD_SR.git] / TD1 / exo2 / Main.java
index 9bab323cffdde5386461d54e873df94a5b143bcb..5ad851b78c8e0d16c9e96b889055c431b0c6a9ae 100644 (file)
@@ -1,7 +1,7 @@
 class Main {
 
      public static void main(String[] args) {
-         final int THREADS_NUMBER = 3;;
+         final int THREADS_NUMBER = 3;
          Thread t[] = new Thread[THREADS_NUMBER];
 
          for (int i = 0; i < t.length; i++) {
@@ -16,6 +16,7 @@ class Main {
             }
             catch (InterruptedException e) {
                 // this part is executed when an exception (in this example InterruptedException) occurs
+                System.err.println("InterruptedException: " + e);
             }
         }
         System.out.println("Threads execution finished");