DriverManager class

382 views
optmiize_your_resume_1

The DriverManager class acts as an interface between user and drivers. It keeps track of the drivers that are available and handles establishing a connection between a database and the appropriate driver. The DriverManager class maintains a list of Driver classes that have registered themselves by calling the method DriverManager.registerDriver().

Useful methods of DriverManager class

MethodDescription
1) public static void registerDriver(Driver driver):is used to register the given driver with DriverManager.
2) public static void deregisterDriver(Driver driver):is used to deregister the given driver (drop the driver from the list) with DriverManager.
3) public static Connection getConnection(String url):is used to establish the connection with the specified url.
4) public static Connection getConnection(String url,String userName,String password):is used to establish the connection with the specified url, username and password.
DriverManager class

This article is contributed by Akash Gain. If you like Techarge and would like to contribute, you can also write an article using https://techarge.in/start-blogging-with-us/ or mail your article to [email protected] . See your article appearing on the Techarge home page and help other to learn. 🙂

20%off for Ink 280 281

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More