正确关闭数据库连接的顺序是哪个?
A: A. Connection -> Statement -> ResultSet
B: B. ResultSet -> Statement -> Connection
C: C. Statement-> Connection -> ResultSet
D: D. Statement-> ResultSet -> Connection
A: A. Connection -> Statement -> ResultSet
B: B. ResultSet -> Statement -> Connection
C: C. Statement-> Connection -> ResultSet
D: D. Statement-> ResultSet -> Connection
举一反三
- 下列关闭数据库连接的顺序正确的是:( ) A: 先关闭Statement,再关闭ResultSet,最后关闭Connection B: 先关闭ResultSet,再关闭Statement,最后关闭Connection C: 先关闭ResultSet,再关闭Connection,最后关闭Statement D: 先关闭Statement,再关闭Connection,最后关闭ResultSet
- 以下操作数据库结束后关闭资源顺序合理的是() A: ResultSet>Statement(或PreparedStatement)->Connection B: Connection>Statement(或PreparedStatement)->ResultSet C: Statement(或PreparedStatement)>ResultSet->Connection D: 以上都错误
- 哪个对象负责同数据库建立连接? A: A. Driver B: B. Connection C: C. Statement D: D. ResultSet
- JDBC共有四类驱动程序:connection、statement、preparestatement、resultSet。()
- 数据库查询结果集是以下哪个类?( ) A: ResultSet B: Statement C: Connection D: Result