how to handle multiple exceptions in java code example
Example 1: java throws multiple exceptions
public class MyClass implements MyInterface {
public void find(int x) throws A_Exception, B_Exception{
----
----
---
}
}
Example 2: java catch multiple exceptions
catch(IOException | SQLException ex){
logger.error(ex);
throw new MyException(ex.getMessage());
}