Class.forName(dbDriver) work with DriverManager.getConnection()?
One of hundreds of answers available with our premium content service.
A: The static Class.forName() method is a way to instantiate a class that minimises hard coded dependencies in your Java applications. You may well know the database driver you intend to use when you first write your code, but if you use a String variable for the driver class name you can re-configure for a different database product without re-writing your client application.
… full answer hidden
Premium members click below for full answer
How does Class.forName(dbDriver) work with DriverManager.getConnection()?