Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- import javax.swing.JOptionPane;
- /**
- *
- * @author AgungPramono
- */
- public class BasisData {
- public static void main(String[] args) {
- try {
- Class.forName("com.mysql.jdbc.Driver");
- } catch (Exception e) {
- System.out.println(e);
- }
- //Membangun koneksi ke database
- try {
- Connection konek = DriverManager.getConnection("jdbc:mysql://localhost:3306/infonegara", "root", "");
- System.out.println("sukses");
- } catch (Exception e) {
- System.out.println(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement