Skip to content

Commit 2bb503c

Browse files
committed
changes to add semester full of cs java test and terminate the ones that are not required
1 parent 793649e commit 2bb503c

File tree

4,748 files changed

+551194
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,748 files changed

+551194
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0" encoding="UTF-8"?><commitmessages/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
import java.sql.*;//step 1:import the required package
3+
public class Dbconfig {
4+
5+
6+
//step 2:define the credentials
7+
private final String uname="aloy";
8+
private final String url="jdbc:oracle:thin:@localhost:1521:em";
9+
private final String pass="1234";
10+
private final String drivername="oracle.jdbc.driver.OracleDriver";
11+
Connection con;
12+
public Connection getConnected(){
13+
14+
try {
15+
Class.forName(drivername);// throws ClassNotfoundException
16+
this.con=DriverManager.getConnection(url, uname, pass);// throws SQLException
17+
System.out.println("connected");
18+
} catch (ClassNotFoundException | SQLException e) {
19+
20+
e.printStackTrace();
21+
}
22+
23+
return con;
24+
25+
26+
}
27+
28+
29+
30+
}

0 commit comments

Comments
 (0)