Java 异常finally的使用2 Java 异常finally的使用1 Java 异常的继承 Java 异常finally的使用2 public class HelloWorld { public static void main(String []args) { try { int data = 25/5; System.out.println(data); } catch(NullPointerException e) { System.out.println(e); } finally { System.out.println("finally block is always executed"); } System.out.println("rest of the code..."); } } Java 异常finally的使用1 Java 异常的继承