conn = DBConnection.connect(); String SQL = "SELECT * from usertable"; // ResultSet ResultSet rs = conn.createStatement().executeQuery(SQL); if (rs.next()) { System.out.println(rs.getString(1)); }