Code example for SQLException

Methods: printStackTrace

0
                CONN = DriverManager.getConnection(url, user, password);
                return CONN;
                 
            }  
            catch (SQLException ex) {
                ex.printStackTrace();
                return null; 
            } 
            catch (Exception ex) {
                ex.printStackTrace();
                return null; 
            } 
        } 
        else 
            return CONN;
    } 
     
}