使用多个Catch块的Java示例链式异常 Java示例使用Catch处理异常 Java示例处理链式异常 使用多个Catch块的Java示例链式异常 public class Main{ public static void main (String args[])throws Exception { int n = 20, result = 0; try { result = n/0; System.out.println("The result is"+result); } catch(ArithmeticException ex) { System.out.println ("Arithmetic exception occoured: "+ex); try { throw new NumberFormatException(); } catch(NumberFormatException ex1) { System.out.println ("Chained exception thrown manually : "+ex1); } } } } Java示例使用Catch处理异常 Java示例处理链式异常