please help
package com.codegym.task.task14.task1419;
import java.awt.Color;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
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
//1
try {
float i = 1 / 0;
} catch (Exception e) {
exceptions.add(e);
}
//2
try {
int a = 9, b=0;
int c= a/b;
}
catch (ArithmeticException e) {
exceptions.add(e);
}
//3
try {
int arr[]= new int[5];
arr[7]=9;
}
catch(ArrayIndexOutOfBoundsException e) {
exceptions.add(e);
}
//4
try {
String a = null; //null value
System.out.println(a.charAt(0));
} catch(NullPointerException e) {
exceptions.add(e);
}
//5
try {
String a = "Abu the monkey";
char c = a.charAt(40);
}
catch(StringIndexOutOfBoundsException e){
exceptions.add(e);
}
//6
try {
File file = new File("E://file.txt");
FileReader fr = new FileReader(file);
} catch (FileNotFoundException e) {
exceptions.add(e);
}
//7
try {
int num = Integer.parseInt("baba");
}
catch(NumberFormatException e) {
exceptions.add(e);
}
//8
try {
Object x[] = new String[3];
x[0] = new Integer(0);
} catch (ArrayStoreException e) {
exceptions.add(e);
}
//9
try {
new URL("malformedurl");
} catch (MalformedURLException e) {
exceptions.add(e);
}
//10
try {
String[] dateStr = new String[-5];
} catch (NegativeArraySizeException e) {
exceptions.add(e);
}
}
}