Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection con=null;
- try{
- Class.forName("com.mysql.jdbc.Driver");
- System.out.println("connection close 1111111111111111111");
- con = DriverManager.getConnection("jdbc:mysql://localhost/", "root", "admin123");
- System.out.println("connection"+con);
- con.close();
- }catch(Exception e){
- con.close();
- System.out.println("connection not close");
- e.printStackTrace();
- }
- finally{
- con.close();
- System.out.println("connection finally close");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement