CIW
1D0-441 · Question #80
Consider the following code segment: 1. ResultSet rs = s.executeQuery(SELECT Student_ID, Activity + 2. FROM Activities + 3. WHERE Fee >0); 4. 5. while(rs.next()) { 6. String s_num =…
The correct answer is C. To move the result set cursor to the next row. See the full explanation below for the reasoning.
Question
Consider the following code segment: 1. ResultSet rs = s.executeQuery(SELECT Student_ID, Activity + 2. FROM Activities + 3. WHERE Fee >0); 4. 5. while(rs.next()) { 6. String s_num = rs.getString(Student_ID); 7. String act_name = rs.getString(Activity); 8. } What is the purpose of the next method used in this code segment?
Options
- ATo execute the next SQL statement
- BTo move to the next row in the Activities relation
- CTo move the result set cursor to the next row
- DTo remove the result set cursor to the next column
How the community answered
(65 responses)- A5% (3)
- B12% (8)
- C75% (49)
- D8% (5)
Community Discussion
No community discussion yet for this question.