I don't understand correctly what needs to be implemented...
package de.codegym.task.task09.task0918;
/*
Wir sind hier alle Freunde, sogar die Ausnahmen
*/
import java.io.IOException;
public class Solution {
public static void main(String[] args) throws MeineAusnahme, MeineAusnahme2, MeineAusnahme3, MeineAusnahme4 {
methode1();
}
public static void methode1() throws MeineAusnahme, MeineAusnahme2, MeineAusnahme3, MeineAusnahme4 {
int i = (int) (Math.random() * 3);
if (i == 0)
throw new MeineAusnahme();
if (i == 1)
throw new MeineAusnahme2();
if (i == 2)
throw new MeineAusnahme3();
if (i == 3)
throw new MeineAusnahme4();
}
static class MeineAusnahme extends IOException {
}
static class MeineAusnahme2 extends NullPointerException{
}
static class MeineAusnahme3 extends RuntimeException{
}
static class MeineAusnahme4 extends IndexOutOfBoundsException{
}
}