Help make the task with the threads, in which you need to enter the size of the array, enter the name of the values in this array. I'm still new.
That is the result should be
Code that is already
public static void main(String args[]) { Scanner in = new Scanner(System.in); System.out.print("Количество потоков: "); int s = in.nextInt(); try { Thread.sleep(1000); } catch(InterruptedException e) { System.out.println("Главный поток прерван"); } for (int i = s; i >0;i--){ Thread t = Thread.currentThread(); System.out.println("Создан поток " + i + " " + t); t.setName(""+i); System.out.println(t.getName() + " Завершил свою работу"); } } 