Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn=null;
- Statement st=null;
- public Connection Database() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- conn=DriverManager.getConnection("jdbc:mysql://localhost/library?" +
- "user=root&password=");
- st=conn.createStatement();
- return conn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement