Что не нравится? У меня компилируется, у них нет.
package com.javarush.task.task14.task1419;
import java.awt.datatransfer.MimeTypeParseException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InterruptedIOException;
import java.lang.module.FindException;
import java.net.BindException;
import java.nio.file.AtomicMoveNotSupportedException;
import java.util.ArrayList;
import java.util.FormatterClosedException;
import java.util.IllegalFormatFlagsException;
import java.util.List;
import java.util.concurrent.ExecutionException;
/*
Нашествие исключений
*/
public class Solution {
public static List<Exception> exceptions = new ArrayList<Exception>();
public static void main(String[] args) {
initExceptions();
for (Exception exception : exceptions) {
System.out.println(exception);
}
}
private static void initExceptions() { //the first exception
try {
float i = 1 / 0;
} catch (Exception e) {
exceptions.add(e);
}
String s = null;
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
s = reader.readLine();
} catch (IOException e) {
exceptions.add(e);
}
exceptions.add(new BindException());
exceptions.add(new ArrayStoreException());
exceptions.add(new CloneNotSupportedException());
exceptions.add(new ClassCastException());
exceptions.add(new StringIndexOutOfBoundsException());
exceptions.add(new FindException());
exceptions.add(new MimeTypeParseException());
exceptions.add(new InterruptedIOException());
//напишите тут ваш код
}
}