Multiple choice technology

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 returns an integer representing the number of rows affected by INSERT, UPDATE, or DELETE operations. This allows applications to verify whether the operation succeeded. Option A is imprecise (doesn't specify what's returned), and option C is incorrect; there's only one executeUpdate method signature that returns int.