Esempio
public
static
class
ClassA
throws
NullPointerException {
public
void
methodA {
throw new
NullPointerException();
}
Soluzione
Creare una clausola catch dedicata per ogni eccezione dichiarata nella clausola throws.
public
static
class
ClassA
throws
Error {
public
void
methodA {
throw new
Error();
}