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 of the above

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

The executeUpdate() method in JDBC returns an integer value representing the number of rows affected by the SQL operation (INSERT, UPDATE, DELETE). Option A incorrectly states it returns 'all the rows' rather than the count. Option C is incorrect because while overloaded versions exist, they all return row counts.