Hi,
can anybody let me know what is the difference between the following statements when intended to end the usage of it?
finally{
try{
if(con != null){
con.close();
}
}catch(Exception e){
System.out.println("Error in closing connection");
}
}
OR
finally{
con =null;
}
also can i set NULL to Resultset or Prepared statement instead of close() method?
Please let me know what will be the difference in each case.
Thanks in Advance.