1.Always clean up after
yourself
nIf you
are using resources like database connections or network connections, make sure you clean
them up.
n
npublic void dataAccessCode(){
n Connection conn = null;
n try{
n conn = getConnection();
n ..some code that throws
SQLException
n } catch( SQLException ex ) {
n ex.printStacktrace();
n } finally{
n DBUtil.closeConnection(conn);
n }
n}