nerdexam
Oracle

1Z0-805 · Question #83

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

The correct answer is B. Class.forname ("org.xyzdata.jdbc.NetWorkDriver"). 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…

Building Database Applications with JDBC

Question

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

Options

  • ADriverManager.loadDriver("org.xyzdata.jdbc.network driver");
  • BClass.forname ("org.xyzdata.jdbc.NetWorkDriver");
  • CConnection con = Connection.getDriver
  • DConnection con = Drivermanager.getConnection

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    68% (13)
  • C
    11% (2)
  • D
    16% (3)

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().

Topics

#JDBC driver loading#Class.forName#DriverManager#JDBC 3.0

Community Discussion

No community discussion yet for this question.

Full 1Z0-805 Practice