Which try-catch statements are correct?
a)
try {
// code that may throw an exception
} catch (Exception e) {
// ...
} catch (RuntimeException e) {
// ...
}
b)
try {
// code that may throw an exception
} catch (RuntimeException | Exception e) {
// ...
}
c)
try {
// code that may throw an exception
} catch (IndexOutOfBoundsException | NullPointerException e) {
// ...
} catch (RuntimeException e) {
// ...
}
d)
try {
// code that may throw an exception
} catch (IndexOutOfBoundsException e) {
// ...
} catch (RuntimeException e) {
// ...
} catch (Exception e) {
// ...
}