Which java clas represents SQL statements that are complied before they are executed
-
Statement
-
PreparedStatement
-
ResultSet.
-
Callable Statement
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.