Guest User

conexao

a guest
May 10th, 2019
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. import java.sql.Connection;  
  2. import java.sql.DriverManager;  
  3. import java.sql.SQLException;
  4.  
  5. public class conexao {
  6.     public Connection getConnection()  {
  7.         try{
  8.             return DriverManager.getConnection("jdbc:mysql://localhost:3307/info3","root","");  
  9.         }      
  10.         catch(SQLException excecao){
  11.             throw new RuntimeException(excecao);
  12.         }
  13.     }
  14. }
Add Comment
Please, Sign In to add comment