Java SE 8 Programmer II — Question 21

Which action can be used to load a database driver by using JDBC3.0?

Answer options

Correct answer: B

Explanation

The correct answer is B because the java.lang.Class.forName method is specifically designed to dynamically load classes at runtime, which is essential for loading the JDBC driver. Option A is incorrect as it relates to a different configuration method, while Option C refers to a method that does not directly load the driver class like Class.forName does. Option D is incomplete and does not provide any actionable information.