Multiple choice technology architecture

Which java clas represents SQL statements that are complied before they are executed?

  1. Statement

  2. PreparedStatement

  3. ResultSet.

  4. Callable Statement

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

PreparedStatement represents SQL statements that are pre-compiled and can be executed multiple times with different parameter values. This offers better performance for repeated queries and protection against SQL injection. Unlike regular Statements, PreparedStatements allow you to set parameters using placeholders.