📄 dbutils.java
字号:
/* * DBUtils.java * * Created on June 9, 2005, 2:51 PM * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package common;import java.sql.*;/** * * @author kevin */public final class DBUtils { /** Creates a new instance of DBUtils */ public DBUtils() { } public static void close(ResultSet rs, Statement stmt, Connection conn){ try{ if(rs != null)rs.close(); if(stmt != null)stmt.close(); if(conn != null)conn.close(); }catch(SQLException e){} } public static void close(ResultSet rs, Statement stmt){ close(rs, stmt, null); } public static void close(ResultSet rs){ close(rs, null); } public static void close(Statement stmt, Connection conn){ close(null, stmt, conn); } public static void close(Statement stmt){ close(null, stmt, null); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -