try { Integer myInteger = new Integer("$"); } catch (Exception x) { System.out.println("error"); return; } finally { System.out.println("clean up"); }
MyFileObject obj = new MyFileObject("test.in"); try { obj.open(); } catch(IOException) { System.out.println("an error occurred"); } finally { obj.close(); }