Skip to content

Instantly share code, notes, and snippets.

@UrkoLekuona
UrkoLekuona / TestConnection.java
Last active August 4, 2020 08:26
Test connection to a Database using Java (Simple main class)
package com.example.jdbc_postgres;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
/**