try {
try {
db operation
} finnaly {
conn.close();
}
}catch(Exception e) {
catch exception
}
the inner try - finnaly is responsible for closing db connection.
outer try-catch to catch exception.
this is good method to design code because that make code maintain and read easyly.