I've written this code, it meets all the requirements except the very first one: The run method must run until the thread is terminated (!IsInterrupted). I thought the following while-loop in the run() method was serving that purpose:
public void run() {
            while (!isInterrupted()) {...}
}
Besides, IntellijIDEA produces no output, whereas the output on CodeGym's server is the following: #1:[1, 2, 3, 4, 5, ] #2:[] #3:[] Exception in thread "Thread-2" java.lang.NullPointerException at com.codegym.task.task16.task1628.Solution$ReaderThread.run(Solution.java:49) Exception in thread "Thread-3" java.lang.NullPointerException at com.codegym.task.task16.task1628.Solution$ReaderThread.run(Solution.java:49) That probably means that the 2nd and 3d threads (consoleReader2 and consoleReader3) haven't been filled with values. They probably got interrupted too early. I'm not sure how to fix that and how to make the program first let every thread finish its work and only then stop. I thought the run method completed the whole cycle for each thread...