getConnection()
method of DriverManager class. DriverManager is the factory for connection.The forName()
method of the Class class is used to register the driver class. This method is used to load the driver class dynamically. Consider the following example to register OracleDriver class.Class.forName("oracle.jdbc.driver.OracleDriver");