один пункт не проходит не могу понять в чем прикол. может кто объяснит пож-та
package com.javarush.task.task16.task1617;
/*
Отсчет на гонках
*/
public class Solution {
public static volatile int numSeconds = 3;
public static void main(String[] args) throws InterruptedException {
RacingClock clock = new RacingClock();
Thread.sleep(3500);
clock.interrupt();
}
public static class RacingClock extends Thread {
public RacingClock() {
start();
}
public void run() {
while(true) {
try {
if (numSeconds >= 1) {
System.out.print(numSeconds + " ");
} else {
System.out.print("Марш!");
}
numSeconds--;
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.print("Прервано!");
break;
// throw new IllegalArgumentException();
}
}
}
}
}