Here you can find the source of getStatement(Map
private static Statement getStatement(Map<String, String> config) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException
//package com.java2s; //License from project: Apache License import java.sql.*; import java.util.Map; public class Main { private static Statement getStatement(Map<String, String> config) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException { Class.forName(config.get("driver")).newInstance(); Connection connection = DriverManager.getConnection(config.get("url"), config.get("user"), config.get("password")); return connection.createStatement(); }//from www . j a v a 2s.co m }