How do I count rows in ResultSet?

How do I count rows in ResultSet? Getting the number of rows using methods The last() method of the ResultSet interface moves the cursor to the last row o...