Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Connection_maker
- {
- private Connection conn;
- private static final String DESTINATION = "jdbc:mysql://localhost/";
- public Connection_maker()
- {
- try
- {
- Class.forName("com.mysql.jdbc.Driver");
- this. conn = java.sql.DriverManager.getConnection(DESTINATION, "root", "");
- System.out.println("connected");
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- public static void main(String[] args)
- {
- new Connection_maker();
- }
- }
Add Comment
Please, Sign In to add comment