1
JavaIntermediate#concurrency
A single catch block can handle multiple unrelated exception types using the pipe (|) operator, reducing duplicated catch blocks when the handling logic is identical.
try {
riskyOperation();
} catch (IOException | SQLException e) {
System.out.println("Error: " + e.getMessage());
}