Ошибка в 4-ой нити по валидатору. Вроде по коду всё верно, решил глянуть в мейне по вызову. И метод showWarning() почему-то не находит, вызвать нельзя, с чем это связано?
java: cannot find symbol
symbol: method showWarning()
location: class java.lang.Thread
package com.javarush.task.task16.task1632;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
/*
Клубок
*/
public class Solution {
public static List<Thread> threads = new ArrayList<>(5);
static {
threads.add(new Thread(new Permanent()));
threads.add(new Thread(new InterruptedExceptionThread()));
threads.add(new Thread(new Hurray()));
threads.add(new StopMessage());
threads.add(new Thread(new ConsoleThread()));
}
public static void main(String[] args) throws InterruptedException {
threads.get(3).start();
Thread.sleep(3000);
threads.get(3).showWarning();
}
}