Working With Type 4 Driver

Working With Type 4 Driver

In this tutorial, we are going to discuss about Working With Type 4 Driver. Type 4 driver also known as Pure Java Driver OR Thin Driver.

Working With Type-4 Driver

Type-2 and Type-4 Drivers of Oracle having same Jar File, same Driver Class Name, but different JDBC URL’s.

Driver Class Name : oracle.jdbc.driver.OracleDriver oracle.jdbc.OracleDriver
JDBC URL : jdbc:oracle:thin:@localhost:1521:XE
import java.sql.*;
 * @author ashok.mariyala
public class Type4DbConnectDemo { 
   public static void main(String[] args) throws Exception { 
      Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","scott","tiger"); 
      Statement st = con.createStatement();
      ResultSet rs = st.executeQuery("select * from emp");
      while( {

That’s all about the Working With Type 4 Driver in JDBC. If you have any queries or feedback, please write us email at Enjoy learning, Enjoy Java.!!

Working With Type 4 Driver
Scroll to top