Beispiel
public
static
class
ClassA
throws
NullPointerException {
public
void
methodA {
throw new
NullPointerException();
}
Lösung
Erstellen Sie für jede Ausnahmebedingung, die in der throws-Klausel deklariert ist, eine dedizierte catch-Klausel.
public
static
class
ClassA
throws
Error {
public
void
methodA {
throw new
Error();
}