import java.io.*; public class FinallyTest1 { public static int finallyTest(String arg) { try { return Integer.parseInt(arg); } catch (Exception e) { e.printStackTrace(); return 0; } finally { System.out.println("inside FINALLY block of method finallyTest"); } } public static void main(String[] args) { String arg = (args.length>0) ? args[0] : "" ; System.out.println("Result = " + finallyTest(arg)); } }