Skip to content
Sharp

SQL for Java Devs · interview question

What does calling commit() on a JDBC connection evaluate to?

Multiple choiceMediumchapter-8-curatedpremiumsql-for-java-devstransactions
Choose one answer
Answer and explanation

Correct answer

C. All pending changes in the current transaction are saved to the database.

Why

Calling commit() on a JDBC connection finalizes all changes made during the current transaction, making them permanent in the database.

Test yourself on SQL for Java Devs

A free test with instant, explained results. No account needed.

Start free test
All SQL for Java Devs questions →