Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package ztestconnection;
  2.  
  3. import java.sql.*;
  4.  
  5. public class Test {
  6.  
  7. static String Username = "Klongrich";
  8. static String Password = "cash7144";
  9. static String Connection = "jdbc:mysql://localhost:8080/hospital";
  10.  
  11. public static void main(String [] args){
  12.  
  13. Connection con = null;
  14.  
  15. try{
  16. con = DriverManager.getConnection(Connection, Username, Password);
  17. System.out.println("Connected");
  18. } catch(Exception e){
  19. System.out.println(e);
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement