如题,
运行结果:
bbb
abcdef
@Test public void testRuntimeException() { int a = 0; try { aaa333(); } catch (Exception ex) { System.out.println("bbb"); } System.out.print("abcdef"); } private void aaa333() { int a = 0; try { int b = 32 / a; } catch (Exception ex) { throw new RuntimeException("error;"); }
}