Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Connection con=null;
  2. try{
  3. Class.forName("com.mysql.jdbc.Driver");
  4. System.out.println("connection close 1111111111111111111");
  5. con = DriverManager.getConnection("jdbc:mysql://localhost/", "root", "admin123");
  6. System.out.println("connection"+con);
  7. con.close();
  8. }catch(Exception e){
  9. con.close();
  10. System.out.println("connection not close");
  11. e.printStackTrace();
  12. }
  13. finally{
  14. con.close();
  15. System.out.println("connection finally close");
  16. }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement