Given records from the Player table: and given the code fragment: try {
Connection conn = DriverManager.getConnection(URL, username, password);
Statement st= conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
st.execute ("SELECT * FROM Player");
st.setMaxRows(2);
ResultSet rs = st.getResultSet();
rs.absolute(3);
while (rs.next ()) {
System.out.println(rs.getInt(1) + " " + rs.getString(2));
}
} catch (SQLException ex) {
System.out.print("SQLException is thrown.");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with URL, username, and password.
The SQL query is valid.
What is the result?
jduarte
Highly Voted 4 years, 4 months ago6c84cb9
Most Recent 9 months, 2 weeks agoDarGrin
1 year agoshivkumarx
1 year, 2 months agoiSnover
1 year, 4 months agosteefaand
1 year, 4 months agoHuim
4 years, 1 month agoHuim
4 years, 1 month ago