Don’t use C++ exception specifications
Exception specifications should be very familiar to Java programmers. Here is an example: class MyException extends Exception { } class Foo { void abc(int x) throws MyException { if (x < 0) throw new MyException(); } void def() throws MyException { abc(3);…