Here you can find the source of getDBConn()
public static Connection getDBConn() throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Main { private static String DBURL = "jdbc:mysql://localhost:3306/nearby"; private static String USERNAME = "root"; private static String PASSWORD = "root"; public static Connection getDBConn() throws SQLException { return DriverManager.getConnection(DBURL, USERNAME, PASSWORD); }//w w w . j a v a 2 s . c o m }