Multiple choice technology architecture

Which of the following are true ?

  1. The executeUpdate method returns all the rows that were affected

  2. The executeUpdate method returns the no. of rows that were affected

  3. Depends , as there is more than one version of this method with different return types

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The executeUpdate method in JDBC returns an integer representing the number of rows affected by the SQL operation (INSERT, UPDATE, DELETE). It doesn't return the actual row data - just a count. For SELECT queries, you'd use executeQuery which returns a ResultSet.