try {
conn = getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
return rs.getInt(1);
} finally {
里的return rs.getInt(1);没用
一般都是先在外面定义一个变量 int a;
然后if(rs.next()){a = rs.getInt(1);}
然后在finally里 renturn a;
最好能把异常信息也贴出来