Suppose the ResultSet is scrollable and contains 10 rows with the values 1-10 respectively.
What is the output of the following?.
5: rs.absolute(0); 6: rs.relative(5); 7: rs.relative(-10); 8: rs.relative(5); 9: System.out.print(rs.getInt(1));
B.
The cursor starts out at position zero, right before the first row.
Line 6 moves the cursor to position five.
Line 7 tries to move the cursor ten rows before that position which is row negative five.
Since you can't move back before row zero, the cursor is at row zero instead.
Then line 8 moves the cursor forward five positions from row zero, leaving it at row five and making Option B the answer.