Java OCA OCP Practice Question 2041

Question

Which statement is true about the JDBC core classes?.

  • A. Driver is an implementation of DriverManager.
  • B. A general Connection implementation is included in the JDK.
  • C. A Statement automatically starts in auto-commit mode.
  • D. A ResultSet automatically starts pointing to the first row of data.


C.

Note

Option A is incorrect because Driver is an interface while DriverManager is a concrete class.

The inverse isn't true either; DriverManager doesn't implement Driver.

Option B is incorrect because the Connection implementation comes from the database driver jar.

Option C is correct.

You can turn off auto-commit mode, but it defaults to on.

Option D is incorrect because you need to call rs.

next() or an equivalent method to point to the first row.




PreviousNext

Related