Advertisement
Guest User

Untitled

a guest
May 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1.      public static DatabaseConnector create() throws SQLException {
  2.         try {
  3.             return new DatabaseConnector("localhost", "tamagotchi", "root", "");
  4.         } catch (SQLException ex) {
  5.             throw ex;
  6.         }
  7.     }
  8.  
  9.     private void connect() throws SQLException {
  10.         try {
  11.             dbConnection = DriverManager.getConnection("jdbc:mysql://" + dbHost + ":3306/" + dbDatabase, dbUsername, dbPassword);
  12.         } catch (SQLException ex) {
  13.             throw ex;
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement