Which JDBC object is responsible for managing database drivers?

Get ready for your Object‑Oriented Programming Test. Use flashcards and multiple-choice questions. Each question includes hints and explanations. Prepare for your exam today!

Multiple Choice

Which JDBC object is responsible for managing database drivers?

Explanation:
The ability to manage and select database drivers in JDBC is handled by a central registry that keeps track of all available drivers. This role is fulfilled by the DriverManager. It registers drivers when they’re loaded, and when you request a connection it asks the registered drivers which one can handle the given URL and then delegates to that driver to establish the connection. The other options serve different purposes: a Connection is the active session with a database; DataSource is a factory for obtaining connections (often with pooling and resource management); and a Driver is the specific driver implementation that speaks the database protocol.

The ability to manage and select database drivers in JDBC is handled by a central registry that keeps track of all available drivers. This role is fulfilled by the DriverManager. It registers drivers when they’re loaded, and when you request a connection it asks the registered drivers which one can handle the given URL and then delegates to that driver to establish the connection. The other options serve different purposes: a Connection is the active session with a database; DataSource is a factory for obtaining connections (often with pooling and resource management); and a Driver is the specific driver implementation that speaks the database protocol.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy