1: Connection conn = null; 2: PreparedStatement pstmt = null; 3: try { 4: conn=getConnection(); 5: ... 6: pstmt = conn.prepareStatement("SELECT * FROM employees 7: where name=?"); 8: ... 9: conn.close(); 10: pstmt.close(); 11: }catch (SQLException ex) {...}