Which of the following position a ResultSet cursor to a location immediately before the first row? (Choose all that apply.)
beforeFirst()
first()
next()
B, D.
On a scrollable ResultSet, the absolute()
method positions the cursor.
-1 means the last row.
1 means the first row.
0 means before the first row.
Therefore, choice B is correct.
There is also a method beforeFirst()
that is equivalent, making choice D correct as well.