java.sql.Statement is an interface. It provides methods to submit SQL queries to the database. It will be implemented by driver implementation providers. With the help of createStatement() method you can get Connection object and return Statement object.
java.sql.ResultSet is an interface and it is used to retrieve SQL select query results. A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set. It provides getXXX() methods to get data from each iteration.
Where XXX represents datatypes ex- int,float,double and string etc.