How do you handle multiple exceptions in a single catch block in Java?
try {
// code that might throw multiple exceptions
} catch (IOException | SQLException ex) {
ex.printStackTrace();
}
How do you handle multiple exceptions in a single catch block in Java?
try {
// code that might throw multiple exceptions
} catch (IOException | SQLException ex) {
ex.printStackTrace();
}