Here you can find the source of getConnection()
public static Connection getConnection() 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 { static final String url = "jdbc:oracle:thin:@localhost:1521:xe"; static final String user = "CRESCER16"; static final String pass = "CRESCER16"; public static Connection getConnection() throws SQLException { return DriverManager.getConnection(url, user, pass); }//from w w w .j a v a 2 s. com }