1. it is an interface, then which class implements this interface ?
One of the classes that is residing in the jdbc jar.
It is a nice mechanism where you can write code using a database independent interface, and the database dependent class is loaded for you. When you step through the code with a debugger, you can see the real class that implements the interface.
ResultSet contains db connections ? or for each move, it will connect to DB again ? or table rows are cached in memory, so it will not need DB connection ?
It uses the connection. You can think about a ResultSet as a pointer (or cursor) into your query results. Each move will make it point to the next record.
The fact that it cashes records or not is dependent on the particular driver you use, and might be influenced by the value you set with setFetchSize().