title: Which should I close first, the PreparedStatement or the Connection?
body: <p>When using a <code>PreparedStatement</code> in JDBC, should I close the <code>PreparedStatement</code> first or the <code>Connection</code> first? I just saw a code sample in which the <code>Connection</code> is closed first, but it seems to me more logical to close the <code>PreparedStatement</code> first.</p>
  
  <p>Is there a standard, accepted way to do this? Does it matter? Does closing the <code>Connection</code> also cause the <code>PreparedStatement</code> to be closed, since the <code>PreparedStatement</code> is directly related to the <code>Connection</code> object?</p>