DriverManager Class in JDBC

DriverManager Class

The DriverManager class is responsible for managing the basic service to set of JDBC drivers. It acts as an interface between Java application and drivers. The DriverManager class will attempt to load the driver classes referenced in "jdbc.drivers" system property.

The DriverManager class loads the JDBC drivers to the system property.

DriverManager Class Methods

getDriver(String url)Helps to locate a driver that understands the given URL.
registerDriver(Driver driver)Used to register the given driver with the DriverManager class.
static void deregisterDriver(Driver driver)Removes the specified driver from the DriverManager class.
static Connection getConnection(String url)It creates the connection with the given database URL.
static Connection getConnection(String url, String username, String password)Establishes the connection with given database URL with username and password.