nerdexam
Oracle

1Z0-809 · Question #245

Given the records from the STUDENT table: sid sname semail 111 James [email protected] 112 Jane [email protected] 114 John [email protected] Given the code fragment: public static void main(String[] args) throws…

The correct answer is A. The STUDENT table is not updated and the program prints: 114 : john : [email protected]. You've hit your session limit · resets 5:20pm (America/New_York)

Question

Given the records from the STUDENT table: sid sname semail 111 James [email protected] 112 Jane [email protected] 114 John [email protected] Given the code fragment: public static void main(String[] args) throws SQLException { //code to load and register valid JDBC Driver Connection con = DriverManager.getConnection(URL, username, password); Statement st = con.createStatement(); ResultSet rs = st.executeQuery("SELECT * FROM student"); ResultSetMetaData rsmd = rs.getMetaData(); rs.absolute(3); rs.updateString(2, "Jannet"); rs.updateString(3, "[email protected]"); rs.updateRow(); rs.refreshRow(); System.out.println(rs.getInt(1) + " : " + rs.getString(2) + " : " + rs.getString(3)); } Assume that the URL, username, and password are valid. What is the result?

Options

How the community answered

(18 responses)
  • A
    72% (13)
  • B
    6% (1)
  • C
    17% (3)
  • D
    6% (1)

Explanation

You've hit your session limit · resets 5:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice