This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
What this ResultSet actual contains? It maintains a cursor,if it like this cursor is Current Set of Rows and so at the client side we get excuted rows,when we say next the it fetches the data from cursor which are in client side.
So people say ResultSet maintains rowid's of the excuted query
I believe the internals of ResultSet is completely up to the JDBC Driver, so there's no simple answer to your question. For a lot of connections though, you can set a fetch size which will retrieve a specific number of records from the database at a given time often used to optimize network traffic. After all, its not often ideal to hit the database for each record.
Think of Google's search engine. You may have a million matches, but it only shows 10 at a time. You wouldn't want it to hit the database for every single item anymore than you'd want it to return all million records. The simple ideal solution is to return 10 (in practice this can vary precisely, as in the first record might be returned quickly and the following 9 might be grouped).