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

A PreparedStatement represents a precompiled SQL statement that is compiled once by the database management system and can be executed multiple times with different parameters. The standard Statement compiles SQL on every execution, while ResultSet holds query results and CallableStatement is for stored procedures.