🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: JDBC: all 10 questions

Quiz: JDBC · Question 3 of 10

Which method should you call for an UPDATE statement?

Which method should you call for an UPDATE statement?

  1. A.executeQuery()
  2. B.executeUpdate()
  3. C.getResultSet()
  4. D.next()
Answer & explanation

Correct answer: executeUpdate()

executeUpdate returns how many rows were changed.

Can you get the rest right without peeking?

Take the timed Quiz: JDBC quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →