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

Which action can be used to load a database driver by using JDBC3.0?
A. Add the driver class to the META-INF/services folder of the JAR file.
B. Include the JDBC driver class in a jdbc.properties file.
C. Use the java.lang.Class.forName method to load the driver class.
D. Use the DriverManager.getDriver method to load the driver class.

Download Printable PDF. VALID exam to help you PASS.

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

  1. Prior to JDBC 4.0, the way to load the Driver was to use the forName method of the Class class. In the parameter, specify the name of the Driver (category path). The program will automatically call the DriverDriver’s registerDriver method to load (register) the Driver.

    Option A, which is the mechanism of JDBC 4.0, will be automatically loaded by writing the name of the Driver to the file “META-INF/services/java.sql.Driver”.

    Option B, there is no such usage.

    Option C, the correct way to load Driver.

    Option D, the getDriver method of the DriverManager class is just used to retrieve the loaded Driver object.

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.