Клубок: 6 уровень, 13 лекция Java Core / Clew: level 6, lesson 13 JavaRush

Опубликовано: 14 Апрель 2026
на канале: Serhii Il
87
2

00:00 - 1
07:53 - 2


Клубок: 6 уровень, 13 лекция Java Core /
Clew: level 6, lesson 13 JavaRush


Задание от JavaRush
Клубок: 6 уровень, 13 лекция Java Core
Создай 5 различных нитей. В статическом блоке добавь свои нити в List threads в перечисленном порядке.
Нить 1 должна бесконечно выполняться;
Нить 2 должна выводить "InterruptedException" при возникновении исключения InterruptedException;
Нить 3 должна каждые полсекунды выводить "Ура";
Нить 4 должна реализовать интерфейс Message, при вызове метода showWarning нить должна останавливаться;
Нить 5 должна читать с консоли числа пока не введено слово "N", а потом вывести в консоль сумму введенных чисел.
Нити не должны стартовать автоматически.


The task from JavaRush
Clew: level 6, lesson 13 Java Core
Craft 5 different strands. In the static block, add your threads to the List threads in the order listed.
Thread 1 must run indefinitely;
Thread 2 should throw "InterruptedException" when an InterruptedException is thrown;
Thread 3 should output "Hurray" every half second;
Thread 4 must implement the Message interface,
the thread must stop when the showWarning method is called;
Thread 5 should read numbers from the console until the word "N" is entered, and then print the sum of the numbers entered to the console.
The threads should not start automatically.


Java Developer
Android Studio
Язык программирования Джава
Андроид Студио



Repeat after me, then delete and write the code from memory. Create a new task and write the program yourself
Повтори за мной, затем удали и напиши код по памяти. Придумай новое задание и напиши программу самостоятельно


Thank you for watching
Спасибо за просмотр