Skip to content
Sharp

SQL for Java Devs · interview question

Which method is used to add SQL statements to a batch in JDBC?

Multiple choiceEasychapter-8-curatedpremiumsql-for-java-devsbatching
Choose one answer
Answer and explanation

Correct answer

C. AddBatch()

Why

The addBatch() method is used to add SQL statements to the batch in JDBC. This method queues up the SQL statements to be executed later using executeBatch().

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 →