Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn= null;
- try
- {
- conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/gourav","root ","root");
- if (conn!=null)
- {
- System.out.println("Database connected");
- }
- }
- catch(Exception ex)
- {
- System.out.println(ex);
- }
- }
Add Comment
Please, Sign In to add comment