Where to close java PreparedStatements and ResultSets?
In Java 7, you should not close them explicitly, but use automatic resource management to ensure that resources are closed and exceptions are handled appropriately. Exception handling works like this: Exception in try | Exception in close | Result —————–+——————–+—————————————- No | No | Continue normally No | Yes | Throw the close() exception Yes … Read more