write a get query via jdbc to mysql code example
Example: mysql jdbc query
Connection conn = DriverManager.getConnection(url,username,password);
Statement stmt = conn.createStatement();
String sql = "SELECT first_name, last_name, email " +
"FROM candidates";
ResultSet rs = stmt.executeQuery(sql)