Multiple choice

Which of the following methods is not present in the Statement interface in java database programming?

  1. addBatch(String sql)

  2. closeOnCompletion()

  3. executeQuery(String sql)

  4. executeBatch()

  5. getResults()

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

There is no method named getResults() in the Statement interface. The correct method name is getMoreResults(), which moves to this Statement object's next result; returns true if it is a ResultSet object and implicitly closes any current ResultSet object(s) obtained with the method getResultSet. So, this answer is true.