code: public static boolean loadDriver(ClassLoader classLoader, String driverClassName) {
          try {
              classLoader.loadClass(driverClassName).newInstance();
              return true;
  
          } catch (IllegalAccessException e) {
              // Constructor is private, OK for DriverManager contract
              return true;
  
          } catch (Exception e) {
              return false;
  
          }
      }
docs: Loads and registers a database driver class.
  If this succeeds, it returns true, else it returns false.
  
  @param classLoader     the class loader used to load the driver class
  @param driverClassName of driver to load
  @return boolean <code>true</code> if the driver was found, otherwise <code>false</code>