# 完整檔案 ```java= //PreparedStatement、Statement這些出現提示選有java.sql那個 //*.close();出現提示全選第2個 public void close(Connection comm) { //傳送Driver跟驗證帳密 if (comm != null) { comm.close(); } } public void close(PreparedStatement ps) { //傳送SQL語法(但能防止SQL注入攻擊) if(ps !=null) { ps.close(); } } public void close(Statement st) { //傳送SQL語法 if(st !=null) { st.close(); } } public void close(ResultSet rs) { //接受語法後收循的資料與存取 if(rs !=null) { rs.close(); } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up