or are they the same ?
} catch (RuntimeException re) {
...
}
or
} catch (Exception e) {
...
}
or are they the same ?
} catch (RuntimeException re) {
...
}
or
} catch (Exception e) {
...
}
RuntimeException
extends Exception
, so Exception
is strictly broader. (And they're not the same; e.g. IOException
is an Exception
but not a RuntimeException
.)