-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperators.java
More file actions
35 lines (20 loc) · 727 Bytes
/
operators.java
File metadata and controls
35 lines (20 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class operators {
public static Connection connect(){
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/highschooldb","root","");
} catch (Exception e) {
System.out.println("inter.operator.connect()");
JOptionPane.showConfirmDialog(null,e);
}
return con;
}
}