In your program you want to use the JDBC-ODBC Bridge driver. What code do you use?

  1. Class.callName("sun.jdbc.odbc.JdbcOdbcDriver");

  2. Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

  3. Class.callfunc("JdbcOdbcDriver");

  4. Class.Name.init("sun.jdbc.odbc.JdbcOdbcDriver");


Correct Option: B
Explanation:

To use the JDBC-ODBC Bridge driver in a program, you would use the following code:

The Answer is: B

Explanation:

The correct code to use when you want to make use of the JDBC-ODBC Bridge driver is:

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Option A is incorrect because there is no method callName() that can be used to call the driver.

Option C is incorrect because there is no method callfunc() that can be used to call the driver.

Option D is incorrect because there is no method init() available in the Class.Name package.

Find more quizzes: