nerdexam
CIW

1D0-441 · Question #121

Consider the following code fragment: 1. Statement s = conn.createStatement(); 2. ResultSet rs = s.executeQuery(SELECT * FROM Orders + 3. WHERE Order_Date = '02-22-02'); 4. while(rs.next()) 5…

The correct answer is B. 02-22-02. See the full explanation below for the reasoning.

Question

Consider the following code fragment: 1. Statement s = conn.createStatement(); 2. ResultSet rs = s.executeQuery(SELECT * FROM Orders + 3. WHERE Order_Date = '02-22-02'); 4. while(rs.next()) 5. System.out.println(rs.getString(2)); Assume that variable conn references a valid and open Connection object to a database containing the Orders Relation (shown in the exhibit). Which output is generated?

Exhibit

1D0-441 question #121 exhibit

Options

  • A2019
  • B02-22-02
  • C1003
  • DA compile-time error occurs at line 2.

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    73% (35)
  • C
    8% (4)
  • D
    15% (7)

Community Discussion

No community discussion yet for this question.

Full 1D0-441 Practice