Ausnahmebehandlung in der implementierten Methode

Der folgende Code gibt einen geprüften Fehler anthrows Exception:

import java.io.IOException;

interface some {
    void ss99() throws IOException;
}

public class SQL2 implements some {
    @Override
    public void ss99 () throws Exception {}
// ...
}

während die unten kompiliert gut:

import java.io.IOException;

interface some {
    void ss99() throws IOException;
}

public class SQL2 implements some {
    @Override
    public void ss99 () throws NullPointerException {}
// ...
}

uf welcher Logik macht Java das? Irgendwelche Idee

TIA.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage