Java / JDBC
What is the role of DriverManager in JDBC?
DriverManager is a factory class that is responsible for maintaining the single instance of each registered driver. DriverManager eliminates having multiple instances of the same driver as it is Singleton.
The DriverManager acts as a registry and provides lookup mechanism by taking the connection URL and finding the suitable driver for it. When a driver understands the URL, DriverManager passes the URL to it to create the database connection.
More Related questions...