Java SE 8 Programmer II — Question 126

Which statement is true about the DriverManager class?

Answer options

Correct answer: A

Explanation

The correct answer is A because the DriverManager class is responsible for establishing a connection to the database and returning an instance of it. Option B is incorrect as executing SQL statements is the responsibility of the Connection object. Option C is misleading since DriverManager loads the driver classes but does not return instances through jdbc.drivers. Option D is also wrong because DriverManager is a standard part of Java and not vendor-specific.