last
public boolean last()
throws SQLExceptionMoves the cursor to the last row in this ResultSet object.
Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
//the result set type is TYPE_FORWARD_ONLY时会抛出异常。所以应该把result set类型给改成直接访问最后一个row的。