Guest User

Untitled

a guest
Jul 8th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package devvela;
  2.  
  3. import java.sql.*;
  4.  
  5. public class DBconnection {
  6.  
  7.     private final static String URL = "jdbc:mysql://localhost:3306/productsdb";
  8.     private final static String USERNAME = "root";
  9.     private final static String PASSWORD = "1905";
  10.  
  11.     public Connection connection;
  12.  
  13.     public DBconnection() {
  14.  
  15.         try {(connection = DriverManager.getConnection(URL, USERNAME, PASSWORD))
  16.         }
  17.         catch (SQLException e) {
  18.             e.printStackTrace();
  19.         }
  20.     }
  21.  
  22.  
  23. }
Add Comment
Please, Sign In to add comment