Skip to content
Sharp

SQL for Java Devs · interview question

Which JDBC method is used to execute a SQL SELECT query?

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

Correct answer

B. ExecuteQuery()

Why

The executeQuery() method is used to execute SQL SELECT queries in JDBC, and it returns a ResultSet object containing the data produced by the query.

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 →