In Java SE 7 and later, a single In the Note: If a Catching More Than One Type of Exception with One Exception Handler
catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.catch clause, specify the types of exceptions that block can handle, and separate each exception type with a vertical bar (|):catch (IOException|SQLException ex) {
logger.log(ex);
throw ex;
}
catch block handles more than one exception type, then the catch parameter is implicitly final. In this example, the catch parameter ex is final and therefore you cannot assign any values to it within the catch block.
(via arigamin)








