Which code fragment is required to load a JDBC 3.0 driver?

Which code fragment is required to load a JDBC 3.0 driver?

Which code fragment is required to load a JDBC 3.0 driver?

A.
DriverManager.loadDriver(�org.xyzdata.jdbc.network driver�);

B.
Class.forname (�org.xyzdata.jdbc.NetWorkDriver�);

C.
Connection con = Connection.getDriver
(�jdbc:xyzdata: //localhost:3306/EmployeeDB�);

D.
Connection con = Drivermanager.getConnection
(�jdbc:xyzdata: //localhost:3306/EmployeeDB�);

Explanation:
Note that your application must manually load any JDBC drivers prior to version 4.0.
The simplest way to load a driver class is to call the Class.forName() method.
If the fully-qualified name of a class is available, it is possible to get the corresponding Class using the static method Class.forName().



Leave a Reply 0

Your email address will not be published. Required fields are marked *