package com.codegym.task.task16; public class Solution { public static volatile int numSeconds = 4; public static void main(String[] args) throws InterruptedException { RacingClock clock = new RacingClock(); //write your code here Thread.sleep(3500); clock.interrupt(); } public static class RacingClock extends Thread { public RacingClock() { start(); } public void run() { //write your code here try { int constant = numSeconds; while(numSeconds > 0) { System.out.print(numSeconds + " "); Thread.sleep(1000); numSeconds--; } if(constant<=3) { System.out.println("Go!"); } } catch (Exception e) {System.out.print("Interrupted!"); } } } }