Which of the following interface provides the commit() and rollback() methods?
- Statement Interface
- ResultSet Interface
- Connection Interface
- RowSet Interface
Answer
c. Connection Interface
Explanation:
The commit() method makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.
The rollback() method undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.
Free Spring Boot Tutorial - 5 Hours Full Course
Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course