Question states:boolean absolute(int row) throws SQLException
Moves the cursor to the given row number in this ResultSet object.
The java doc says that it moves the cursor to the given row number. Which, in this case would be 5. With that being said, why does the explanation say that it places the cursor after the given row number?The call to rs.absolute() places the cursor right after the given row number if the argument is a positive integer.
Since there are only 5 rows of data, according to the java docs, the call to absolute(5) would place the cursor at 5. Then the subsequent call to rs.next() would return false, since there is nothing after 5. Thus we arrive at the answer that it will not print anything.
Please correct me if i'm wrong, and point out my mistakes. Otherwise, I believe the explanation should be changed to match the java docs, since it could be misleading if i'm correct.
Normally I would try to run the code on my system to test it out and analyze each line; however, I do not want to go through the trouble of setting up a dummy database, and running the code to test this question. Call me lazy I guess .