1 @Test
2 public void Test_Exception() {
3 try {
4 throw new ExceptionB("A");
5 } catch (ExceptionA e) {
6 System.out.println("ExceptionA"); //true
7 } catch (Exception e) {
8 System.out.println("Exception"); //false
9 } /*catch (ExceptionA e) {
10 System.out.println("ExceptionA"); //编译错误
11 }*/
12 }