Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- Class.forName("com.mysql.jdbc.Driver");
- try {
- String url ="jdbc:mysql://localhost:3306/apmasjid";
- String user="root";
- String pass="";
- con=DriverManager.getConnection(url,user,pass);
- stat=con.createStatement();
- System.out.println("Koneksi Berhasil");
- } catch (Exception e) {
- }
- } catch (Exception e) {
- System.out.println("Gagal");
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement