With JDBC, a Connection is automatically closed when it is
A.
idle for 5 minutes
B.
garbage collected
C.
idle for 10 minutes
D.
flushing its buffer
E.
cleaning up its queue
F.
None of the above
Explanation:
Quoted directly from Sun’s Java document site at http//developer.java.sun.com/ A
Connection is automatically closed when it is garbage collected, but cautious
programmers always close the Connection explicitly to directly determine that and
when this occurs and to conserve resources. Note that while the API specifically says
that closing a Connection “releases… database and JDBC resources immediately,”
the JDBC recommendation is to explicitly close Connections and Statements.