1.

How do you register a driver?There are 2 approaches for registering the Driver

Answer»
  • Class.forName() − This method dynamically loads the driver's class file into memory, which automatically registers it. This method is preferable because it allows you to make the driver registration configurable and portable.

  • DriverManager.registerDriver() − This static method is used in case you are using a non-JDK compliant JVM, such as the one provided by Microsoft.



Discussion

No Comment Found