rollback()

Syntax:

void rollback()
              throws SQLException

Description:

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. This method should be used only when auto-commit mode has been disabled.

Throws:

SQLException - if a database access error occurs or auto commit mode is enabled

Reference:

For more information, reference JDBC documentation for: Connection.rollback()