Does Java have a using statement?
<p>Does Java have a using statement that can be used when opening a session in hibernate?</p>

<p>In C# it is something like:</p>

<pre><code>using (var session = new Session())
{


}
</code></pre>

<p>So the object goes out of scope and closes automatically.</p>
