first you have to describe how you intend on loading the driver twice, and what effect you would expect. All of the answers are in the DriverManager, and the code to the DriverManager is available with the JDK
or Drivermanager.registerDriver() to register driver
You are not supposed to call that method from the application. You will just have to invoke Class.forName(driverClassName). The driver class is responsible for registering itself with the DriverManager.
This is correct. You should use Class.forName(), and this will not register the Driver twice. It is possible to load it twice using the DriverManager, but you are not supposed to register drivers like this.
Joined: Dec 06, 2006
David, If I go for using Drivermanager.registerDriver() twice, will this have any effect (error or exception) or will just do fine. This may seem a very strange question but This has been asked at 2 - 3 occasions in different technical interviews.