Regarding java's try/catch syntax; are these blocks equivalent? : <p>In the following block:</p>

<pre><code>    try (final InputStream fis = new BufferedInputStream(Files.newInputStream(f.toPath()));
            final ArchiveInputStream ais = factory.createArchiveInputStream(fn, fis)) {
        System.out.println("Created " + ais.toString());
        ArchiveEntry ae;
        while ((ae = ais.getNextEntry()) != null) {
            System.out.println(ae.getName());
        }
    }
</code></pre>

<p>is this equivalent to the following block:</p>

<pre><code>try {
    final InputStream fis = new BufferedInputStream(Files.newInputS...;
} catch {
    System.out.println("Created " + ais.toString());...
}
</code></pre>

<p>I stumbled across this syntax for try/catch in an apache common's library, and I'm not really sure how to take it.  If I'm not correct in the only assumption that I can think of here, can anybody help me understand it or point me to a reference that explains this syntax?  I've googled and searched aplenty on here and haven't been able to find anything applicable, though admittedly my search-fu is not the best.</p>

<p>Thanks in advance!</p>
