Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl";
- private static final String Username = "DBProject";
- private static final String Password = "database";
- Connection con;
- public void connect(){
- try {
- con = DriverManager.getConnection(URL, Username, Password);
- } catch (SQLException ex) {
- ex.printStackTrace();
- }
- }
- public void disconnect(){
- try {
- con.close();
- } catch (SQLException ex) {
- ex.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement