Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package conexao;
  7. import java.sql.*;
  8.  
  9. /**
  10. *
  11. * @author jonathan.153417
  12. */
  13. public class Conexao {
  14.  
  15. /**
  16. * @param args the command line arguments
  17. */
  18. private static final String USER = "root";
  19. private static final String PSW = "";
  20. private static final String CON = "jdbc:mysql://localhost/teste";
  21.  
  22.  
  23. public static void main(String[] args) throws SQLException {
  24. // TODO code application logic here
  25. Connection connection = DriverManager.getConnection(CON,USER,PSW);
  26.  
  27. System.out.println("Conectou!!");
  28. connection.close();
  29.  
  30.  
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement