/** * Example using finally block * * @author Sara Sprenkle */ public class FinallyTest { /** * @param args */ public static void main(String[] args) { try { System.out.println("In try"); throw new NullPointerException(); // Unreachable Code: System.out.println("After thrown exception"); } catch (ClassCastException e) { System.out.println("In Catch"); } finally { System.out.println("In Finally"); } } }