I concur with Ritchie's answer. However, for the applications that uses try block and are in need of re-writing the try-with-resources block is the way to go. NetBeans 7.1.1 apparently has a tool that will assist in the conversion of an older application to
Java 7, including try-with-resources conversion. I haven't used it but it is discussed at
http://netbeans.org/kb/docs/java/editor-inspect-transform.html