Can I catch multiple Java exceptions in the same catch clause?
In Java, I want to do something like this: try { … } catch (/* code to catch IllegalArgumentException, SecurityException, IllegalAccessException, and NoSuchFieldException at the same time */) { someCode(); } …instead of: try { … } catch (IllegalArgumentException e) { someCode(); } catch (SecurityException e) { someCode(); } catch (IllegalAccessException e) { someCode(); } … Read more