Here you can find the source of getConnection(String drvr, String url, String nm, String pass)
public static Connection getConnection(String drvr, String url, String nm, String pass) throws Exception
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.DriverManager; public class Main { public static Connection getConnection(String drvr, String url, String nm, String pass) throws Exception { Class.forName(drvr);//from w w w. j a va 2s . c o m return DriverManager.getConnection(url, nm, pass); } }