请问在JSP中Connection conn = null;Statement stat = null;ResultSet rs = null;
.......
if(rs != null) {rs.close();}if(stat != null) {stat.close();}if(conn != null) {conn.close();}为什么要用if判断他是否为空?有什么作用?
3個不等於空有不同的意義:判斷數據有效性。
你对一个null调方法试试?