Multiple choice technology programming languages

How can you execute DML statements in the database?

  1. By making use of the InsertStatement, DeleteStatement or UpdateStatement classes

  2. By invoking the execute(...) or executeUpdate(...) method of a normal Statement object

  3. By invoking the executeInsert(...), executeDelete(...) or executeUpdate(...) methods of

  4. By making use of the execute(...) statement of the DataModificationStatement object

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

DML statements (INSERT, UPDATE, DELETE) are executed using Statement.execute() for general SQL or Statement.executeUpdate() which returns the row count. The other options describe non-existent classes and methods - there are no separate InsertStatement/DeleteStatement classes, nor executeInsert/executeDelete methods on Statement.