10-14 строки.
Впервые сталкиваюсь с этим.
Как такое исправить?
Помогите пожалуйста разобраться.
package com.javarush.task.task16.task1632;
import java.util.*;
import java.io.*;
public class Solution {
public static List<Thread> threads = new ArrayList<>(5);
static {
threads.add(new th1());
threads.add(new th2());
threads.add(new th3());
threads.add(new th4());
threads.add(new th5());
}
public static void main(String[] args) {
}
public class th1 extends Thread {
@Override
public void run() {
while (true) {
}
}
}
public class th2 extends Thread {
@Override
public void run() {
try {
throw new InterruptedException();
}
catch (InterruptedException name) {
System.out.println("InterruptedException");
}
}
}
public class th3 extends Thread {
@Override
public void run() {
try {
System.out.println("Ура");
Thread.sleep(500);
}
catch (InterruptedException name) {
}
}
}
public class th4 extends Thread implements Message {
boolean bool = true;
@Override
public void run() {
while (bool) {
}
}
public void showWarning() {
bool = false;
}
}
public class th5 extends Thread {
@Override
public void run() {
int sum = 0;
while (true) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String str = reader.readLine();
if (str.equals("N")) {
break;
}
sum += Integer.parseInt(str);
}
catch (IOException name) {
}
}
System.out.println(sum);
}
}
}