X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TD1%2Fexo2%2FMain.java;h=e97322de725a477bc812a1caf8f702102c81bb42;hb=7293fe6dc670d5164859159aab339fa3a4750773;hp=9bab323cffdde5386461d54e873df94a5b143bcb;hpb=06566a55e1640e3c2c22785dd5ce7d19c947940a;p=TD_SR.git diff --git a/TD1/exo2/Main.java b/TD1/exo2/Main.java index 9bab323..e97322d 100644 --- a/TD1/exo2/Main.java +++ b/TD1/exo2/Main.java @@ -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.out.println("InterruptedException: " + e); } } System.out.println("Threads execution finished");